/development/samples/browseable/MediaRouter/src/com.example.android.mediarouter/player/ |
D | OverlayDisplayWindow.java | 62 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 …]
|
D | LocalPlayer.java | 352 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/samples/browseable/Camera2Raw/src/com.example.android.camera2raw/ |
D | AutoFitTextureView.java | 51 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/tools/etc1tool/ |
D | etc1tool.cpp | 25 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/browseable/Camera2Basic/src/com.example.android.camera2basic/ |
D | AutoFitTextureView.java | 51 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/Camera2Video/src/com.example.android.camera2video/ |
D | AutoFitTextureView.java | 51 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/devbytes/graphics/ImagePixelization/src/com/example/android/imagepixelization/ |
D | ImagePixelization.java | 157 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/samples/HoneycombGallery/src/com/example/android/hcgallery/ |
D | CameraFragment.java | 216 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/ |
D | CameraPreview.java | 199 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 …]
|
D | FrameBufferObjectActivity.java | 80 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 …]
|
D | CompressedTextureActivity.java | 113 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()
|
D | WindowSurface.java | 74 public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { in surfaceChanged() argument 102 void init(int width, int height, float minStep) { in init() argument 103 x = (float)((width-1)*Math.random()); in init() 118 void step(int width, int height, float minStep, float maxStep) { in step() argument 120 if (x <= 0 || x >= (width-1)) { in step() 122 else if (x >= (width-1)) x = width-1; in step()
|
/development/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/ |
D | LabelMaker.java | 202 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 …]
|
D | NumericSprite.java | 32 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()
|
D | MatrixTrackingGL.java | 147 int internalformat, int width, int height, int border, in glCompressedTexImage2D() argument 149 mgl.glCompressedTexImage2D(target, level, internalformat, width, in glCompressedTexImage2D() 154 int yoffset, int width, int height, int format, int imageSize, in glCompressedTexSubImage2D() argument 156 mgl.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, in glCompressedTexSubImage2D() 161 int x, int y, int width, int height, int border) { in glCopyTexImage2D() argument 162 mgl.glCopyTexImage2D(target, level, internalformat, x, y, width, in glCopyTexImage2D() 167 int yoffset, int x, int y, int width, int height) { in glCopyTexSubImage2D() argument 168 mgl.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, in glCopyTexSubImage2D() 352 public void glLineWidth(float width) { in glLineWidth() argument 353 mgl.glLineWidth(width); in glLineWidth() [all …]
|
/development/samples/browseable/HdrViewfinder/src/com.example.android.hdrviewfinder/ |
D | FixedAspectSurfaceView.java | 89 int width = MeasureSpec.getSize(widthMeasureSpec); in onMeasure() local 113 float boxAspectRatio = width / (float) height; in onMeasure() 136 width = (int) (height * mAspectRatio); in onMeasure() 138 height = (int) (width / mAspectRatio); in onMeasure() 142 width = View.resolveSizeAndState(width, widthMeasureSpec, 0); in onMeasure() 146 setMeasuredDimension(width, height); in onMeasure()
|
/development/vndk/tools/definition-tool/assets/visual/ |
D | dep-graph.css | 60 stroke-width: 1.0px; 68 stroke-width: 2.5px; 84 width: 100%; 101 width: 100%; 116 width: 100%; 126 width: auto; 134 width: 20%; 141 width: 80%;
|
/development/samples/SoftKeyboard/src/com/example/android/softkeyboard/ |
D | LatinKeyboard.java | 90 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/samples/training/InteractiveChart/src/com/example/android/interactivechart/ |
D | InteractiveLineGraphView.java | 329 mContentRect.width() / mMaxLabelWidth / 2, in drawAxes() 518 + mContentRect.width() in getDrawX() 519 * (x - mCurrentViewport.left) / mCurrentViewport.width(); in getDrawX() 546 x = (mCurrentViewport.left + (mCurrentViewport.width() / DRAW_STEPS * i)); in drawDataSeriesUnclipped() 568 mEdgeEffectTop.setSize(mContentRect.width(), mContentRect.height()); in drawEdgeEffectsUnclipped() 578 canvas.rotate(180, mContentRect.width(), 0); in drawEdgeEffectsUnclipped() 579 mEdgeEffectBottom.setSize(mContentRect.width(), mContentRect.height()); in drawEdgeEffectsUnclipped() 590 mEdgeEffectLeft.setSize(mContentRect.height(), mContentRect.width()); in drawEdgeEffectsUnclipped() 601 mEdgeEffectRight.setSize(mContentRect.height(), mContentRect.width()); in drawEdgeEffectsUnclipped() 632 + mCurrentViewport.width() in hitTest() [all …]
|
/development/samples/browseable/WatchFace/Wearable/src/com.example.android.wearable.watchface/ |
D | OpenGLWatchFaceService.java | 223 public void onGlSurfaceCreated(int width, int height) { in onGlSurfaceCreated() argument 225 Log.d(TAG, "onGlSurfaceCreated: " + width + " x " + height); in onGlSurfaceCreated() 227 super.onGlSurfaceCreated(width, height); in onGlSurfaceCreated() 230 final float aspectRatio = (float) width / height; in onGlSurfaceCreated() 257 float width, float length, float[] color) { in createHand() argument 262 -width / 2, 0, 0, // bottom left in createHand() 263 width / 2, 0, 0 // bottom right in createHand() 332 private float[] getTickTriangleCoords(float width, float length, int angleDegrees) { in getTickTriangleCoords() argument 337 width / 2, length + 1, 0, // bottom left in getTickTriangleCoords() 338 -width / 2, length + 1, 0 // bottom right in getTickTriangleCoords()
|
/development/samples/browseable/DisplayingBitmaps/src/com.example.android.displayingbitmaps/util/ |
D | ImageResizer.java | 70 public void setImageSize(int width, int height) { in setImageSize() argument 71 mImageWidth = width; in setImageSize() 236 final int width = options.outWidth; in calculateInSampleSize() local 239 if (height > reqHeight || width > reqWidth) { in calculateInSampleSize() 242 final int halfWidth = width / 2; in calculateInSampleSize() 257 long totalPixels = width * height / inSampleSize; in calculateInSampleSize()
|
/development/samples/devbytes/animation/ActivityAnimations/src/com/example/android/activityanim/ |
D | BitmapUtils.java | 89 int width = original.getWidth(); in getThumbnail() local 92 if (width >= height) { in getThumbnail() 93 float scaleFactor = (float) maxDimension / width; in getThumbnail() 98 scaledWidth = (int) (scaleFactor * width); in getThumbnail()
|
/development/scripts/ |
D | stack_core.py | 57 width = "{8}" variable in TraceConverter 72 self.width = "{16}" 75 self.width = "{8}" 78 …ompile("(([ ]*\\b(" + self.register_names[symbol.ARCH] + ")\\b +[0-9a-f]" + self.width + "){2,5})") 95 "(?P<offset>[0-9a-f]" + self.width + ")[ \t]+" # Offset (hex number given without 120 …self.value_line = re.compile("(.*)([0-9a-f]" + self.width + ")[ \t]+([0-9a-f]" + self.width + ")[ … 128 self.code_line = re.compile("(.*)[ \t]*[a-f0-9]" + self.width + 129 "[ \t]*[a-f0-9]" + self.width + 130 "[ \t]*[a-f0-9]" + self.width + 131 "[ \t]*[a-f0-9]" + self.width + [all …]
|
/development/samples/training/AnimationsDemo/src/com/example/android/animationsdemo/ |
D | ZoomActivity.java | 138 if ((float) finalBounds.width() / finalBounds.height() in zoomImageFromThumb() 139 > (float) startBounds.width() / startBounds.height()) { in zoomImageFromThumb() 142 float startWidth = startScale * finalBounds.width(); in zoomImageFromThumb() 143 float deltaWidth = (startWidth - startBounds.width()) / 2; in zoomImageFromThumb() 148 startScale = (float) startBounds.width() / finalBounds.width(); in zoomImageFromThumb()
|
/development/samples/ApiDemos/src/com/example/android/apis/view/ |
D | CustomLayout.java | 153 final int width = child.getMeasuredWidth(); in onLayout() local 159 mTmpContainerRect.right = leftPos + width + lp.rightMargin; in onLayout() 163 mTmpContainerRect.left = rightPos - width - lp.leftMargin; in onLayout() 174 Gravity.apply(lp.gravity, width, height, mTmpContainerRect, mTmpChildRect); in onLayout() 236 public LayoutParams(int width, int height) { in LayoutParams() argument 237 super(width, height); in LayoutParams()
|