Home
last modified time | relevance | path

Searched refs:width (Results 1 – 25 of 173) sorted by relevance

1234567

/development/samples/browseable/Camera2Raw/src/com.example.android.camera2raw/
DAutoFitTextureView.java51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument
52 if (width < 0 || height < 0) { in setAspectRatio()
55 if (mRatioWidth == width && mRatioHeight == height) { in setAspectRatio()
58 mRatioWidth = width; in setAspectRatio()
66 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
69 setMeasuredDimension(width, height); in onMeasure()
71 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
72 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
/development/samples/browseable/Camera2Video/src/com.example.android.camera2video/
DAutoFitTextureView.java51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument
52 if (width < 0 || height < 0) { in setAspectRatio()
55 mRatioWidth = width; in setAspectRatio()
63 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
66 setMeasuredDimension(width, height); in onMeasure()
68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
69 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
/development/samples/browseable/Camera2Basic/src/com.example.android.camera2basic/
DAutoFitTextureView.java51 public void setAspectRatio(int width, int height) { in setAspectRatio() argument
52 if (width < 0 || height < 0) { in setAspectRatio()
55 mRatioWidth = width; in setAspectRatio()
63 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local
66 setMeasuredDimension(width, height); in onMeasure()
68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure()
69 setMeasuredDimension(width, width * mRatioHeight / mRatioWidth); in onMeasure()
/development/samples/browseable/MediaRouter/src/com.example.android.mediarouter/player/
DOverlayDisplayWindow.java62 int width, int height, int gravity) { in OverlayDisplayWindow() argument
65 mWidth = width; in OverlayDisplayWindow()
71 int width, int height, int gravity) { in create() argument
73 return new JellybeanMr1Impl(context, name, width, height, gravity); in create()
75 return new LegacyImpl(context, name, width, height, gravity); in create()
91 public abstract void updateAspectRatio(int width, int height); in updateAspectRatio() argument
110 int width, int height, int gravity) { in LegacyImpl() argument
111 super(context, name, width, height, gravity); in LegacyImpl()
135 int width = (int)(display.getWidth() * INITIAL_SCALE); in show() local
138 height = mHeight * width / mWidth; in show()
[all …]
DLocalPlayer.java352 int width = mMediaPlayer.getVideoWidth(); in updateVideoRect() local
354 if (width > 0 && height > 0) { in updateVideoRect()
355 mVideoWidth = width; in updateVideoRect()
453 int width, int height) { in surfaceChanged() argument
455 Log.d(TAG, "surfaceChanged: " + width + "x" + height); in surfaceChanged()
479 int width = getVideoWidth(); in updateSize() local
481 if (width > 0 && height > 0) { in updateSize()
489 if (surfaceWidth * height < surfaceHeight * width) { in updateSize()
492 lp.width = surfaceWidth; in updateSize()
493 lp.height = surfaceWidth * height / width; in updateSize()
[all …]
/development/tools/etc1tool/
Detc1tool.cpp25 int writePNGFile(const char* pOutput, png_uint_32 width, png_uint_32 height,
143 png_uint_32 width = 0; in read_PNG_File() local
196 png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, in read_PNG_File()
200 stride = 3 * width; in read_PNG_File()
212 *pWidth = width; in read_PNG_File()
242 png_uint_32 width = 0; in readPKMFile() local
264 width = etc1_pkm_get_width(header); in readPKMFile()
266 encodedSize = etc1_get_encoded_data_size(width, height); in readPKMFile()
283 stride = width * 3; in readPKMFile()
290 etc1_decode_image(pEncodedData, pImageData, width, height, 3, stride); in readPKMFile()
[all …]
/development/samples/devbytes/graphics/ImagePixelization/src/com/example/android/imagepixelization/
DImagePixelization.java157 int width = bitmap.getWidth(); in customImagePixelization() local
160 if (mPixelatedBitmap == null || !(width == mPixelatedBitmap.getWidth() && height == in customImagePixelization()
162 mPixelatedBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in customImagePixelization()
165 int xPixels = (int) (pixelizationFactor * ((float)width)); in customImagePixelization()
171 int[] bitmapPixels = new int[width * height]; in customImagePixelization()
172 bitmap.getPixels(bitmapPixels, 0, width, 0, 0, width, height); in customImagePixelization()
179 for (int x = 0; x < width; x+=xPixels) { in customImagePixelization()
183 maxX = Math.min(x + xPixels, width); in customImagePixelization()
188 pixel = bitmapPixels[j * width + i]; in customImagePixelization()
200 int w = Math.min(xPixels, width - x); in customImagePixelization()
[all …]
/development/tools/winscope/src/app/components/timeline/expanded-timeline/
Dtransition_timeline_component_test.ts137 const width = component.canvasDrawer.getScaledCanvasWidth(); constant
141 new Rect(0, padding, Math.floor(width / 5), oneRowHeight),
147 Math.floor(width / 2),
149 Math.floor(width / 2),
208 const width = component.canvasDrawer.getScaledCanvasWidth(); constant
212 new Rect(0, padding, Math.floor(width / 10), oneRowHeight),
217 new Rect(Math.floor(width / 2), padding, Math.floor(width), oneRowHeight),
241 const width = component.canvasDrawer.getScaledCanvasWidth(); constant
243 Math.floor((width * 1) / 4),
245 Math.floor(width / 2),
[all …]
Dcanvas_drawer_test.ts109 function createCanvas(width: number, height: number): HTMLCanvasElement {
111 canvas.width = width;
120 if (canvasA.width !== canvasB.width || canvasA.height !== canvasB.height) {
127 canvasA.width,
133 canvasB.width,
Dabstract_timeline_row_component.ts83 canvas.width = 0;
85 canvas.style.width = 'auto';
91 const width = htmlElement.offsetWidth; constant
99 const HiPPIwidth = window.devicePixelRatio * width;
102 canvas.width = HiPPIwidth;
104 canvas.style.width = width + 'px';
/development/samples/ApiDemos/src/com/example/android/apis/view/
DFixedAspectRatioImageView.java56 final int width, height; in onMeasure() local
59 width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure()
62 width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure()
63 height = (int) (width / mAspectRatio.floatValue()); in onMeasure()
66 width = (int) (height * mAspectRatio.floatValue()); in onMeasure()
68 setMeasuredDimension(width, height); in onMeasure()
/development/tools/winscope/src/app/components/
Dtrackpad_vertical_scroll.svg1 <svg width="90" height="67" viewBox="0 0 90 67" fill="none" xmlns="http://www.w3.org/2000/svg">
3 <rect x="14.0493" y="55.24" width="14.9635" height="5.61135" fill="var(--drawer-color)"/>
4 <rect x="33.7271" y="55.24" width="14.9635" height="5.61135"fill="var(--drawer-color)"/>
5 <path d="M3.08643 11.3276L59.6537 11.3276" stroke="currentColor" stroke-width="4" stroke-linecap="r…
6 …9153 26.874 42.8936 26.7782 44.2357V65.0862" stroke="currentColor" stroke-width="3" stroke-linecap…
9 …6167 46.5513 39.595 46.4554 40.9371V61.7877" stroke="currentColor" stroke-width="3" stroke-linecap…
10 …545C13.0442 41.8627 13.2361 42.73 13.544 43.5374" stroke="#A3A3A3" stroke-width="2" stroke-linecap…
11 …C32.7214 38.5646 32.9133 39.4319 33.2212 40.2393" stroke="#A3A3A3" stroke-width="2" stroke-linecap…
Dtrackpad_horizontal_scroll.svg1 <svg width="80" height="113" viewBox="0 0 80 113" fill="none" xmlns="http://www.w3.org/2000/svg">
3 <rect x="17.671" y="70.741" width="19.1431" height="7.17871" fill="var(--drawer-color)"/>
4 <rect x="42.8446" y="70.741" width="19.1431" height="7.17871" fill="var(--drawer-color)"/>
5 <path d="M3.64539 14.563L76.0131 14.563" stroke="currentColor" stroke-width="4" stroke-linecap="rou…
6 …562 34.0769 54.9457 33.9543 56.6627V83.3372" stroke="currentColor" stroke-width="3" stroke-linecap…
9 …367 59.2502 50.7262 59.1276 52.4432V79.1177" stroke="currentColor" stroke-width="3" stroke-linecap…
10 …3C16.3846 53.6272 16.6301 54.7368 17.024 55.7696" stroke="#A3A3A3" stroke-width="2" stroke-linecap…
11 …C41.5581 49.4077 41.8035 50.5173 42.1974 51.5502" stroke="#A3A3A3" stroke-width="2" stroke-linecap…
Dtrackpad_right_click.svg1 <svg width="63" height="64" viewBox="0 0 63 64" fill="none" xmlns="http://www.w3.org/2000/svg">
3 <rect x="33.4321" y="55.24" width="14.9635" height="5.61135" fill="var(--drawer-color)"/>
4 <path d="M2.7915 11.3276L59.3588 11.3276" stroke="currentColor" stroke-width="4" stroke-linecap="ro…
6 …6169 46.2569 39.5952 46.161 40.9373V61.7879" stroke="currentColor" stroke-width="3" stroke-linecap…
7 …4C32.427 38.5646 32.6189 39.4319 32.9268 40.2393" stroke="#A3A3A3" stroke-width="2" stroke-linecap…
/development/samples/ApiDemos/src/com/example/android/apis/graphics/
DCameraPreview.java199 parameters.setPreviewSize(mPreviewSize.width, mPreviewSize.height); in switchCamera()
210 final int width = resolveSize(getSuggestedMinimumWidth(), widthMeasureSpec); in onMeasure() local
212 setMeasuredDimension(width, height); in onMeasure()
215 mPreviewSize = getOptimalPreviewSize(mSupportedPreviewSizes, width, height); in onMeasure()
224 final int width = r - l; in onLayout() local
227 int previewWidth = width; in onLayout()
230 previewWidth = mPreviewSize.width; in onLayout()
235 if (width * previewHeight > height * previewWidth) { in onLayout()
237 child.layout((width - scaledChildWidth) / 2, 0, in onLayout()
238 (width + scaledChildWidth) / 2, height); in onLayout()
[all …]
DFrameBufferObjectActivity.java80 public void onSurfaceChanged(GL10 gl, int width, int height) { in onSurfaceChanged() argument
82 mSurfaceWidth = width; in onSurfaceChanged()
84 gl.glViewport(0, 0, width, height); in onSurfaceChanged()
98 private void drawOnscreen(GL10 gl, int width, int height) { in drawOnscreen() argument
99 gl.glViewport(0, 0, width, height); in drawOnscreen()
100 float ratio = (float) width / height; in drawOnscreen()
136 private void drawOffscreenImage(GL10 gl, int width, int height) { in drawOffscreenImage() argument
137 gl.glViewport(0, 0, width, height); in drawOffscreenImage()
138 float ratio = (float) width / height; in drawOffscreenImage()
174 private int createTargetTexture(GL10 gl, int width, int height) { in createTargetTexture() argument
[all …]
DCompressedTextureActivity.java113 int width = 128; in load() local
115 Buffer image = createImage(width, height); in load()
116 … ETC1Util.ETC1Texture etc1Texture = ETC1Util.compressTexture(image, width, height, 3, 3 * width); in load()
134 private Buffer createImage(int width, int height) { in createImage() argument
135 int stride = 3 * width; in createImage()
144 for (int x = 0; x < width; x++) { in createImage()
/development/samples/HoneycombGallery/src/com/example/android/hcgallery/
DCameraFragment.java216 final int width = resolveSize(getSuggestedMinimumWidth(), in onMeasure() local
220 setMeasuredDimension(width, height); in onMeasure()
223 mPreviewSize = getOptimalPreviewSize(mSupportedPreviewSizes, width, in onMeasure()
229 parameters.setPreviewSize(mPreviewSize.width, mPreviewSize.height); in onMeasure()
240 final int width = r - l; in onLayout() local
243 int previewWidth = width; in onLayout()
246 previewWidth = mPreviewSize.width; in onLayout()
251 if (width * previewHeight > height * previewWidth) { in onLayout()
254 child.layout((width - scaledChildWidth) / 2, 0, in onLayout()
255 (width + scaledChildWidth) / 2, height); in onLayout()
[all …]
/development/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/
DLabelMaker.java202 int width = Math.max(minWidth, textWidth + padWidth); in add() local
204 int effectiveTextWidth = width - padWidth; in add()
217 if (width > mStrikeWidth) { in add()
218 width = mStrikeWidth; in add()
222 if (u + width > mStrikeWidth) { in add()
233 int u2 = u + width; in add()
238 background.setBounds(u, v, u + width, v + height); in add()
250 mU = u + width; in add()
253 mLabels.add(new Label(width, height, ascent, in add()
254 u, v + height, width, -height)); in add()
[all …]
DNumericSprite.java32 int width = roundUpPower2((int) (interDigitGaps + paint.measureText(sStrike))); in initialize() local
33 mLabelMaker = new LabelMaker(true, width, height); in initialize()
80 public float width() { in width() method in NumericSprite
81 float width = 0.0f; in width() local
85 width += mWidth[c - '0']; in width()
87 return width; in width()
/development/samples/SoftKeyboard/src/com/example/android/softkeyboard/
DLatinKeyboard.java90 mModeChangeKey.width = mSavedModeChangeKey.width; in setLanguageSwitchKeyVisibility()
92 mLanguageSwitchKey.width = mSavedLanguageSwitchKey.width; in setLanguageSwitchKeyVisibility()
98 mModeChangeKey.width = mSavedModeChangeKey.width + mSavedLanguageSwitchKey.width; in setLanguageSwitchKeyVisibility()
99 mLanguageSwitchKey.width = 0; in setLanguageSwitchKeyVisibility()
/development/tools/winscope/src/app/components/timeline/mini-timeline/drawer/
Dmini_timeline_drawer_impl.ts137 return this.canvas.width / this.getXScale();
275 const width = 5; constant
276 this.ctx.fillRect(entry - width / 2, fromTop, width, lineHeight);
280 const width = Math.max(entry.to - entry.from, 3); constant
281 this.ctx.fillRect(entry.from, fromTop, width, lineHeight);
287 const width = 5; constant
288 this.ctx.fillRect(entry - width / 2, fromTop, width, lineHeight);
293 const width = Math.max(entry.to - entry.from, 3); constant
294 this.ctx.fillRect(entry.from, fromTop, width, lineHeight);
/development/tools/emulator/skins/WXGA800/
Dlayout15 width 1280
27 width 1333
52 width 853
/development/tools/emulator/skins/WXGA720/
Dlayout15 width 720
27 width 773
52 width 1333
/development/tools/emulator/skins/WSVGA/
Dlayout15 width 1024
27 width 1076
52 width 654

1234567