Searched refs:weight (Results 1 - 25 of 73) sorted by relevance

123

/frameworks/base/libs/hwui/hwui/
H A DTypeface.cpp43 static SkTypeface::Style computeSkiaStyle(int weight, bool italic) { argument
45 if (weight >= SkFontStyle::kSemiBold_Weight) {
52 static minikin::FontStyle computeMinikinStyle(int weight, bool italic) { argument
53 // TODO: Better to use raw base weight value for font selection instead of dividing by 100.
54 const int minikinWeight = uirenderer::MathUtils::clamp((weight + 50) / 100, 1, 10);
58 // Resolve the relative weight from the baseWeight and target style.
60 int weight = baseWeight; local
62 weight += 300;
65 return computeMinikinStyle(weight, italic);
87 Typeface* Typeface::createAbsolute(Typeface* base, int weight, boo argument
120 createWithDifferentBaseWeight(Typeface* src, int weight) argument
132 createFromFamilies( std::vector<std::shared_ptr<minikin::FontFamily>>&& families, int weight, int italic) argument
[all...]
H A DTypeface.h30 // This indicates that the weight or italic information should be resolved by OS/2 table.
47 // style. There is a base weight concept which is used for calculating relative style from an
50 // For example, if the base Typeface has a base weight of 400 and the desired style is bold, the
51 // resulting Typeface renders the text with a weight of 700. This function doesn't change the
52 // base weight, so even if you create a new Typeface from the bold Typeface specifying bold on
53 // it again, the text is still rendered with a weight of 700.
54 // You can create another base weight Typeface from an existing Typeface with
56 // a specified base weight.
57 // The createAbsolute method creates a new Typeface ignoring the base weight.
59 // Typeface* base = resolveDefault(nullptr); // Usually this has a weight o
[all...]
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/
H A DHistoryEvaluator.java62 sumValue += data.evaluation * data.weight;
63 sumWeight += data.weight;
91 list.get(i).weight *= factor;
95 while (!list.isEmpty() && isZero(list.get(0).weight)) {
105 * For each stroke it holds its initial value and the current weight. Initially the
106 * weight is set to 1.0
110 public float weight; field in class:HistoryEvaluator.Data
114 weight = 1.0f;
/frameworks/support/core-ui/java/android/support/v4/view/animation/
H A DLookupTableInterpolator.java51 float weight = diff / mStepSize;
54 return mValues[position] + weight * (mValues[position + 1] - mValues[position]);
/frameworks/minikin/libs/minikin/
H A DFontUtils.h24 bool analyzeStyle(const uint8_t* os2_data, size_t os2_size, int* weight, bool* italic);
H A DFontFamily.cpp43 FontStyle::FontStyle(int variant, int weight, bool italic) argument
44 : FontStyle(FontLanguageListCache::kEmptyListId, variant, weight, italic) {
47 FontStyle::FontStyle(uint32_t languageListId, int variant, int weight, bool italic) argument
48 : bits(pack(variant, weight, italic)), mLanguageListId(languageListId) {
64 uint32_t FontStyle::pack(int variant, int weight, bool italic) { argument
65 return (weight & kWeightMask) | (italic ? kItalicMask : 0) | (variant << kVariantShift);
112 bool FontFamily::analyzeStyle(const std::shared_ptr<MinikinFont>& typeface, int* weight, argument
118 return ::minikin::analyzeStyle(os2Table.get(), os2Table.size(), weight, italic);
132 // If desired weight is semibold or darker, and 2 or more grades
H A DFontUtils.cpp33 bool analyzeStyle(const uint8_t* os2_data, size_t os2_size, int* weight, bool* italic) { argument
41 *weight = weightClass / 100;
/frameworks/base/core/java/android/gesture/
H A DInstanceLearner.java60 double weight;
62 weight = Double.MAX_VALUE;
64 weight = 1 / distance;
67 if (score == null || weight > score) {
68 label2score.put(sample.label, weight);
/frameworks/base/graphics/java/android/graphics/
H A DFontFamily.java92 public boolean addFont(String path, int ttcIndex, FontVariationAxis[] axes, int weight, argument
106 return nAddFont(mBuilderPtr, fontBuffer, ttcIndex, weight, italic);
114 int weight, int italic) {
123 return nAddFontWeightStyle(mBuilderPtr, font, ttcIndex, weight, italic);
132 * @param weight The weight of the font. If 0 is given, the weight and italic will be resolved
134 * @param isItalic Whether this font is italic. If the weight is set to 0, this will be resolved
139 boolean isAsset, int ttcIndex, int weight, int isItalic,
149 return nAddFontFromAssetManager(mBuilderPtr, mgr, path, cookie, isAsset, ttcIndex, weight,
113 addFontFromBuffer(ByteBuffer font, int ttcIndex, FontVariationAxis[] axes, int weight, int italic) argument
138 addFontFromAssetManager(AssetManager mgr, String path, int cookie, boolean isAsset, int ttcIndex, int weight, int isItalic, FontVariationAxis[] axes) argument
192 nAddFont(long builderPtr, ByteBuffer font, int ttcIndex, int weight, int isItalic) argument
194 nAddFontWeightStyle(long builderPtr, ByteBuffer font, int ttcIndex, int weight, int isItalic) argument
196 nAddFontFromAssetManager(long builderPtr, AssetManager mgr, String path, int cookie, boolean isAsset, int ttcIndex, int weight, int isItalic) argument
[all...]
/frameworks/ml/bordeaux/service/src/android/bordeaux/services/
H A DILearning_StochasticLinearRanker.aidl32 boolean SetModelPriorWeight(in List<StringFloat> weight);
/frameworks/base/core/java/android/hardware/camera2/marshal/impl/
H A DMarshalQueryableMeteringRectangle.java34 /** (xmin, ymin, xmax, ymax, weight) */
47 int weight = value.getMeteringWeight();
53 buffer.putInt(weight);
62 int weight = buffer.getInt();
67 return new MeteringRectangle(xMin, yMin, width, height, weight);
/frameworks/base/core/java/android/widget/
H A DActivityChooserModel.java127 // This cannot be done by a simple comparator since an Activity weight
188 * Attribute for the choice weight.
190 private static final String ATTRIBUTE_WEIGHT = "weight";
209 * Default weight for a choice record.
537 * historical record with weight high enough that this activity will
539 * will eventually change if not used. Also the weight of the record for
552 final float weight;
554 // Add a record with weight enough to boost the chosen at the top.
555 weight = oldDefaultActivity.weight
798 public final float weight; field in class:ActivityChooserModel.HistoricalRecord
807 HistoricalRecord(String activityName, long time, float weight) argument
818 HistoricalRecord(ComponentName activityName, long time, float weight) argument
887 public float weight; field in class:ActivityChooserModel.ActivityResolveInfo
[all...]
/frameworks/support/v7/appcompat/src/android/support/v7/widget/
H A DActivityChooserModel.java119 // This cannot be done by a simple comparator since an Activity weight
180 * Attribute for the choice weight.
182 static final String ATTRIBUTE_WEIGHT = "weight";
201 * Default weight for a choice record.
523 * historical record with weight high enough that this activity will
525 * will eventually change if not used. Also the weight of the record for
538 final float weight;
540 // Add a record with weight enough to boost the chosen at the top.
541 weight = oldDefaultActivity.weight
773 public final float weight; field in class:ActivityChooserModel.HistoricalRecord
782 HistoricalRecord(String activityName, long time, float weight) argument
793 HistoricalRecord(ComponentName activityName, long time, float weight) argument
862 public float weight; field in class:ActivityChooserModel.ActivityResolveInfo
[all...]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
H A DNoisyVelocityTracker.java74 float weight = 10f;
96 mVX += weight * dx / dt;
97 mVY += weight * dy / dt;
98 totalweight += weight;
99 weight *= DECAY;
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
H A DFontFamily_Delegate.java254 FontVariationAxis[] axes, int weight, int italic) {
260 return delegate != null && delegate.addFont(path, ttcIndex, weight, italic);
294 int weight, int isItalic) {
301 int ttcIndex, int weight, int isItalic) {
311 static boolean addFont(long builderPtr, final String path, final int weight, argument
317 delegate.mPostInitRunnables.add(() -> delegate.addFont(path, weight, italic));
320 return delegate.addFont(path, weight, italic);
327 int cookie, boolean isAsset, int ttcIndex, int weight, int isItalic) {
368 if (weight == RESOLVE_BY_FONT_TABLE) {
371 fontInfo.mWeight = weight;
253 addFont(FontFamily thisFontFamily, String path, int ttcIndex, FontVariationAxis[] axes, int weight, int italic) argument
293 nAddFont(long builderPtr, ByteBuffer font, int ttcIndex, int weight, int isItalic) argument
300 nAddFontWeightStyle(long builderPtr, ByteBuffer font, int ttcIndex, int weight, int isItalic) argument
326 nAddFontFromAssetManager(long builderPtr, AssetManager mgr, String path, int cookie, boolean isAsset, int ttcIndex, int weight, int isItalic) argument
423 addFont(final String path, int ttcIndex, int weight, int italic) argument
436 addFont(@onNull String path, int weight, int italic) argument
[all...]
H A DTypeface_Delegate.java92 // Calculate the required weight based on style and weight of this typeface.
93 int weight = mWeight + ((mStyle & Font.BOLD) == 0 ? 0 : FontFamily_Delegate.BOLD_FONT_WEIGHT_DELTA);
94 if (weight > 900) {
95 weight = 900;
102 Font font = ffd.getFont(weight, isItalic);
116 Font font2 = ffd2.getFont(weight, isItalic);
184 /*package*/ static long nativeCreateWeightAlias(long native_instance, int weight) { argument
193 new Typeface_Delegate(delegate.mFontFamilies, delegate.mStyle, weight);
251 public Typeface_Delegate(@NonNull FontFamily_Delegate[] fontFamilies, int style, int weight) { argument
[all...]
/frameworks/minikin/include/minikin/
H A DFontFamily.h40 FontStyle() : FontStyle(0 /* variant */, 4 /* weight */, false /* italic */) {}
41 FontStyle(int weight, bool italic) : FontStyle(0 /* variant */, weight, italic) {} argument
43 : FontStyle(langListId, 0 /* variant */, 4 /* weight */, false /* italic */) {}
45 FontStyle(int variant, int weight, bool italic);
46 FontStyle(uint32_t langListId, int variant, int weight, bool italic);
68 static uint32_t pack(int variant, int weight, bool italic);
130 static bool analyzeStyle(const std::shared_ptr<MinikinFont>& typeface, int* weight,
/frameworks/base/core/java/android/text/
H A DFontConfig.java72 int weight, boolean isItalic) {
76 mWeight = weight;
102 * Returns the weight value for this font.
138 public Alias(@NonNull String name, @NonNull String toName, int weight) { argument
141 mWeight = weight;
159 * Returns the weight associated with this alias.
71 Font(@onNull String fontName, int ttcIndex, @NonNull FontVariationAxis[] axes, int weight, boolean isItalic) argument
/frameworks/base/core/java/com/android/internal/graphics/palette/
H A DTarget.java200 * Returns the weight of importance that this target places on a color's saturation within
203 * <p>The larger the weight, relative to the other weights, the more important that a color
213 * Returns the weight of importance that this target places on a color's lightness within
216 * <p>The larger the weight, relative to the other weights, the more important that a color
226 * Returns the weight of importance that this target places on a color's population within
229 * <p>The larger the weight, relative to the other weights, the more important that a
260 float weight = mWeights[i];
261 if (weight > 0) {
262 sum += weight;
369 * Set the weight o
379 setSaturationWeight(@loatRangefrom = 0) float weight) argument
395 setLightnessWeight(@loatRangefrom = 0) float weight) argument
410 setPopulationWeight(@loatRangefrom = 0) float weight) argument
[all...]
/frameworks/support/v7/palette/src/main/java/android/support/v7/graphics/
H A DTarget.java182 * Returns the weight of importance that this target places on a color's saturation within
185 * <p>The larger the weight, relative to the other weights, the more important that a color
195 * Returns the weight of importance that this target places on a color's lightness within
198 * <p>The larger the weight, relative to the other weights, the more important that a color
208 * Returns the weight of importance that this target places on a color's population within
211 * <p>The larger the weight, relative to the other weights, the more important that a
242 float weight = mWeights[i];
243 if (weight > 0) {
244 sum += weight;
351 * Set the weight o
361 setSaturationWeight(@loatRangefrom = 0) float weight) argument
377 setLightnessWeight(@loatRangefrom = 0) float weight) argument
392 setPopulationWeight(@loatRangefrom = 0) float weight) argument
[all...]
/frameworks/base/core/jni/android/graphics/
H A DFontFamily.cpp124 int weight = givenWeight / 100; local
135 weight = os2Weight;
142 builder->fonts.push_back(minikin::Font(minikinFont, minikin::FontStyle(weight, italic)));
171 jint ttcIndex, jint weight, jint isItalic) {
189 return addSkTypeface(builder, std::move(data), ttcIndex, weight, isItalic);
193 jobject font, jint ttcIndex, jint weight, jint isItalic) {
211 return addSkTypeface(builder, std::move(data), ttcIndex, weight, isItalic);
220 jint weight, jint isItalic) {
258 return addSkTypeface(builder, std::move(data), ttcIndex, weight, isItalic);
170 FontFamily_addFont(JNIEnv* env, jobject clazz, jlong builderPtr, jobject bytebuf, jint ttcIndex, jint weight, jint isItalic) argument
192 FontFamily_addFontWeightStyle(JNIEnv* env, jobject clazz, jlong builderPtr, jobject font, jint ttcIndex, jint weight, jint isItalic) argument
218 FontFamily_addFontFromAssetManager(JNIEnv* env, jobject, jlong builderPtr, jobject jassetMgr, jstring jpath, jint cookie, jboolean isAsset, jint ttcIndex, jint weight, jint isItalic) argument
/frameworks/minikin/tests/util/
H A DFontTestUtils.cpp57 int weight = atoi((const char*)(xmlGetProp(fontNode, (const xmlChar*)"weight"))) / 100; local
74 fonts.push_back(Font(minikinFont, FontStyle(weight, italic)));
78 fonts.push_back(Font(minikinFont, FontStyle(weight, italic)));
/frameworks/base/libs/hwui/
H A DInterpolator.cpp140 float ipart, weight; local
141 weight = modff(lutpos, &ipart);
147 " i1=%d, i2=%d, input=%f, lutpos=%f, size=%zu, values=%p, ipart=%f, weight=%f",
148 i1, i2, input, lutpos, mSize, mValues.get(), ipart, weight);
153 return MathUtils::lerp(v1, v2, weight);
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/
H A DQuickTileLayout.java25 ((LinearLayout.LayoutParams) params).weight = 1;
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
H A DColorfulnessFilter.java69 float weight = (float) Math.pow(2, r);
71 float value = histogramBuffer.get() * weight;

Completed in 735 milliseconds

123