Home
last modified time | relevance | path

Searched refs:metrics (Results 1 – 25 of 56) sorted by relevance

123

/frameworks/base/core/java/android/text/
DBoringLayout.java43 BoringLayout.Metrics metrics, boolean includepad) { in make() argument
45 spacingmult, spacingadd, metrics, in make()
53 BoringLayout.Metrics metrics, boolean includepad, in make() argument
56 spacingmult, spacingadd, metrics, in make()
68 BoringLayout.Metrics metrics, in replaceOrMake() argument
78 metrics, includepad, true); in replaceOrMake()
90 BoringLayout.Metrics metrics, in replaceOrMake() argument
115 metrics, includepad, trust); in replaceOrMake() local
123 BoringLayout.Metrics metrics, boolean includepad) { in BoringLayout() argument
131 metrics, includepad, true); in BoringLayout()
[all …]
/frameworks/base/core/java/android/util/
DTypedValue.java227 public static float complexToDimension(int data, DisplayMetrics metrics) in complexToDimension() argument
232 metrics); in complexToDimension()
252 DisplayMetrics metrics) in complexToDimensionPixelOffset() argument
257 metrics); in complexToDimensionPixelOffset()
279 DisplayMetrics metrics) in complexToDimensionPixelSize() argument
285 metrics); in complexToDimensionPixelSize()
293 public static float complexToDimensionNoisy(int data, DisplayMetrics metrics) in complexToDimensionNoisy() argument
295 float res = complexToDimension(data, metrics); in complexToDimensionNoisy()
321 DisplayMetrics metrics) in applyDimension() argument
327 return value * metrics.density; in applyDimension()
[all …]
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DRenderAction.java102 DisplayMetrics metrics = new DisplayMetrics(); in init() local
103 metrics.densityDpi = mParams.getDensity().getDpiValue(); in init()
105 metrics.density = metrics.noncompatDensity = in init()
106 metrics.densityDpi / (float) DisplayMetrics.DENSITY_DEFAULT; in init()
108 metrics.scaledDensity = metrics.noncompatScaledDensity = metrics.density; in init()
110 metrics.widthPixels = metrics.noncompatWidthPixels = mParams.getScreenWidth(); in init()
111 metrics.heightPixels = metrics.noncompatHeightPixels = mParams.getScreenHeight(); in init()
112 metrics.xdpi = metrics.noncompatXdpi = mParams.getXdpi(); in init()
113 metrics.ydpi = metrics.noncompatYdpi = mParams.getYdpi(); in init()
118 mContext = new BridgeContext(mParams.getProjectKey(), metrics, resources, in init()
DRenderSessionImpl.java174 DisplayMetrics metrics = getContext().getMetrics(); in init() local
184 findStatusBar(resources, metrics); in init()
185 findActionBar(resources, metrics); in init()
186 findSystemBar(resources, metrics); in init()
966 private void findStatusBar(RenderResources resources, DisplayMetrics metrics) { in findStatusBar() argument
984 mStatusBarSize = (int)typedValue.getDimension(metrics); in findStatusBar()
991 private void findActionBar(RenderResources resources, DisplayMetrics metrics) { in findActionBar() argument
1017 mActionBarSize = (int)typedValue.getDimension(metrics); in findActionBar()
1042 mTitleBarSize = (int)typedValue.getDimension(metrics); in findActionBar()
1050 private void findSystemBar(RenderResources resources, DisplayMetrics metrics) { in findSystemBar() argument
[all …]
/frameworks/base/core/java/com/android/internal/app/
DPlatLogoActivity.java42 DisplayMetrics metrics = new DisplayMetrics(); in makeView() local
43 getWindowManager().getDefaultDisplay().getMetrics(metrics); in makeView()
52 final int p = (int)(8 * metrics.density); in makeView()
58 final float size = 14 * metrics.density; in makeView()
63 lp.bottomMargin = (int) (-4*metrics.density); in makeView()
69 tv.setShadowLayer(4*metrics.density, 0, 2*metrics.density, 0x66000000); in makeView()
77 tv.setShadowLayer(4*metrics.density, 0, 2*metrics.density, 0x66000000); in makeView()
91 DisplayMetrics metrics = new DisplayMetrics(); in onCreate() local
92 getWindowManager().getDefaultDisplay().getMetrics(metrics); in onCreate()
98 final int p = (int)(32 * metrics.density); in onCreate()
/frameworks/base/core/jni/android/graphics/
DHarfbuzzSkia.cpp143 static void getGlyphMetrics(HB_Font hbFont, HB_Glyph glyph, HB_GlyphMetrics* metrics) in getGlyphMetrics() argument
153 metrics->x = SkScalarToHBFixed(bounds.fLeft); in getGlyphMetrics()
154 metrics->y = SkScalarToHBFixed(bounds.fTop); in getGlyphMetrics()
155 metrics->width = SkScalarToHBFixed(bounds.width()); in getGlyphMetrics()
156 metrics->height = SkScalarToHBFixed(bounds.height()); in getGlyphMetrics()
158 metrics->xOffset = SkScalarToHBFixed(width); in getGlyphMetrics()
162 metrics->yOffset = 0; in getGlyphMetrics()
DPaint.cpp296 SkPaint::FontMetrics metrics; in ascent() local
297 (void)GraphicsJNI::getNativePaint(env, paint)->getFontMetrics(&metrics); in ascent()
298 return SkScalarToFloat(metrics.fAscent); in ascent()
303 SkPaint::FontMetrics metrics; in descent() local
304 (void)GraphicsJNI::getNativePaint(env, paint)->getFontMetrics(&metrics); in descent()
305 return SkScalarToFloat(metrics.fDescent); in descent()
310 SkPaint::FontMetrics metrics; in getFontMetrics() local
311 … SkScalar spacing = GraphicsJNI::getNativePaint(env, paint)->getFontMetrics(&metrics); in getFontMetrics()
315 env->SetFloatField(metricsObj, gFontMetrics_fieldID.top, SkScalarToFloat(metrics.fTop)); in getFontMetrics()
316 … env->SetFloatField(metricsObj, gFontMetrics_fieldID.ascent, SkScalarToFloat(metrics.fAscent)); in getFontMetrics()
[all …]
/frameworks/rs/
DrsScriptC_LibGL.cpp298 static void SetMetrics(Font::Rect *metrics, in SetMetrics() argument
301 *left = metrics->left; in SetMetrics()
304 *right = metrics->right; in SetMetrics()
307 *top = metrics->top; in SetMetrics()
310 *bottom = metrics->bottom; in SetMetrics()
319 Font::Rect metrics; in rsrMeasureTextAlloc() local
320 rsc->mStateFont.measureText(text, textLen, &metrics); in rsrMeasureTextAlloc()
321 SetMetrics(&metrics, left, right, top, bottom); in rsrMeasureTextAlloc()
327 Font::Rect metrics; in rsrMeasureText() local
328 rsc->mStateFont.measureText(text, textLen, &metrics); in rsrMeasureText()
[all …]
/frameworks/base/core/java/com/android/internal/widget/
DWeightedLinearLayout.java58 final DisplayMetrics metrics = getContext().getResources().getDisplayMetrics(); in onMeasure() local
59 final int screenWidth = metrics.widthPixels; in onMeasure()
60 final boolean isPortrait = screenWidth < metrics.heightPixels; in onMeasure()
/frameworks/base/tests/RenderScriptTests/PerfTest/src/com/android/perftest/
DTextTest.java85 DisplayMetrics metrics = mRes.getDisplayMetrics(); in initTextScript() local
89 Font.Style.NORMAL, 8.0f / metrics.density)); in initTextScript()
91 Font.Style.NORMAL, 8.0f / metrics.density)); in initTextScript()
/frameworks/testing/uiautomator/library/src/com/android/uiautomator/core/
DUiDevice.java121 DisplayMetrics metrics = new DisplayMetrics(); in isPhone() local
123 display.getMetrics(metrics); in isPhone()
127 if(metrics.heightPixels > metrics.widthPixels) in isPhone()
131 if(metrics.heightPixels < metrics.widthPixels) in isPhone()
/frameworks/base/core/java/android/view/
DViewConfiguration.java280 final DisplayMetrics metrics = res.getDisplayMetrics(); in ViewConfiguration() local
282 final float density = metrics.density; in ViewConfiguration()
332 final DisplayMetrics metrics = context.getResources().getDisplayMetrics(); in get() local
333 final int density = (int) (100.0f * metrics.density); in get()
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DViewLayersActivity3.java57 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
58 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
DViewLayersActivity4.java64 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
65 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
DViewLayersActivity2.java60 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
61 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
DTransparentListActivity.java113 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
114 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
DViewLayersActivity5.java70 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
71 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
DListActivity.java119 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
120 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
DViewLayersActivity6.java80 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
81 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
DViewLayersActivity.java107 final DisplayMetrics metrics = r.getDisplayMetrics(); in getView() local
108 v.setCompoundDrawablePadding((int) (6 * metrics.density + 0.5f)); in getView()
/frameworks/base/core/java/android/net/http/
DAndroidHttpClientConnection.java79 private HttpConnectionMetricsImpl metrics = null; field in AndroidHttpClientConnection
124 this.metrics = new HttpConnectionMetricsImpl( in bind()
261 this.metrics.incrementRequestCount(); in sendRequestHeader()
375 this.metrics.incrementResponseCount(); in parseResponseHeader()
462 return this.metrics; in getMetrics()
/frameworks/base/tests/TransformTest/src/com/google/android/test/transform/
DTransformTestActivity.java129 DisplayMetrics metrics = context.getResources().getDisplayMetrics(); in TransformView() local
130 mPosX = metrics.widthPixels/2; in TransformView()
131 mPosY = metrics.heightPixels/2; in TransformView()
/frameworks/base/core/java/android/webkit/
DViewManager.java104 DisplayMetrics metrics = w.getWebView().getResources().getDisplayMetrics(); in ViewManager() local
105 int pixelArea = metrics.widthPixels * metrics.heightPixels; in ViewManager()
/frameworks/base/core/java/android/content/res/
DResources.java166 public Resources(AssetManager assets, DisplayMetrics metrics, Configuration config) { in Resources() argument
167 this(assets, metrics, config, null); in Resources()
182 public Resources(AssetManager assets, DisplayMetrics metrics, in Resources() argument
187 updateConfiguration(config, metrics); in Resources()
1400 DisplayMetrics metrics) { in updateConfiguration() argument
1401 updateConfiguration(config, metrics, null); in updateConfiguration()
1408 DisplayMetrics metrics, CompatibilityInfo compat) { in updateConfiguration() argument
1419 if (metrics != null) { in updateConfiguration()
1420 mMetrics.setTo(metrics); in updateConfiguration()
1543 public static void updateSystemConfiguration(Configuration config, DisplayMetrics metrics, in updateSystemConfiguration() argument
[all …]
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
DPaint_Delegate.java535 /*package*/ static float getFontMetrics(Paint thisPaint, FontMetrics metrics) { in getFontMetrics() argument
542 return delegate.getFontMetrics(metrics); in getFontMetrics()
1244 private float getFontMetrics(FontMetrics metrics) { in getFontMetrics() argument
1247 if (metrics != null) { in getFontMetrics()
1249 metrics.top = - javaMetrics.getMaxAscent(); in getFontMetrics()
1250 metrics.ascent = - javaMetrics.getAscent(); in getFontMetrics()
1251 metrics.descent = javaMetrics.getDescent(); in getFontMetrics()
1252 metrics.bottom = javaMetrics.getMaxDescent(); in getFontMetrics()
1253 metrics.leading = javaMetrics.getLeading(); in getFontMetrics()

123