/development/samples/browseable/MediaRouter/src/com.example.android.mediarouter/player/ |
D | OverlayDisplayWindow.java | 62 int width, int height, int gravity) { in OverlayDisplayWindow() argument 66 mHeight = height; 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() 136 int height = (int)(display.getHeight() * INITIAL_SCALE); in show() local 138 height = mHeight * width / mWidth; in show() [all …]
|
D | LocalPlayer.java | 353 int height = mMediaPlayer.getVideoHeight(); in updateVideoRect() local 354 if (width > 0 && height > 0) { in updateVideoRect() 356 mVideoHeight = height; in updateVideoRect() 453 int width, int height) { in surfaceChanged() argument 455 Log.d(TAG, "surfaceChanged: " + width + "x" + height); in surfaceChanged() 480 int height = getVideoHeight(); in updateSize() local 481 if (width > 0 && height > 0) { in updateSize() 489 if (surfaceWidth * height < surfaceHeight * width) { in updateSize() 493 lp.height = surfaceWidth * height / width; in updateSize() 497 lp.width = surfaceHeight * width / height; 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() 59 mRatioHeight = height; in setAspectRatio() 67 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 69 setMeasuredDimension(width, height); in onMeasure() 71 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 74 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); in onMeasure()
|
/development/tools/etc1tool/ |
D | etc1tool.cpp | 25 int writePNGFile(const char* pOutput, png_uint_32 width, png_uint_32 height, 144 png_uint_32 height = 0; in read_PNG_File() local 196 png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, in read_PNG_File() 202 pSourceImage = new etc1_byte[stride * height]; in read_PNG_File() 208 for (etc1_uint32 y = 0; y < height; y++) { in read_PNG_File() 213 *pHeight = height; in read_PNG_File() 243 png_uint_32 height = 0; in readPKMFile() local 265 height = etc1_pkm_get_height(header); in readPKMFile() 266 encodedSize = etc1_get_encoded_data_size(width, height); in readPKMFile() 284 pImageData = new png_byte[stride * height]; in readPKMFile() [all …]
|
/development/samples/HoneycombGallery/src/com/example/android/hcgallery/ |
D | CameraFragment.java | 218 final int height = resolveSize(getSuggestedMinimumHeight(), in onMeasure() local 220 setMeasuredDimension(width, height); in onMeasure() 224 height); in onMeasure() 229 parameters.setPreviewSize(mPreviewSize.width, mPreviewSize.height); in onMeasure() 241 final int height = b - t; in onLayout() local 244 int previewHeight = height; in onLayout() 247 previewHeight = mPreviewSize.height; in onLayout() 251 if (width * previewHeight > height * previewWidth) { in onLayout() 252 final int scaledChildWidth = previewWidth * height in onLayout() 255 (width + scaledChildWidth) / 2, height); in onLayout() local [all …]
|
/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
D | CameraPreview.java | 199 parameters.setPreviewSize(mPreviewSize.width, mPreviewSize.height); in switchCamera() 211 final int height = resolveSize(getSuggestedMinimumHeight(), heightMeasureSpec); in onMeasure() local 212 setMeasuredDimension(width, height); in onMeasure() 215 mPreviewSize = getOptimalPreviewSize(mSupportedPreviewSizes, width, height); in onMeasure() 225 final int height = b - t; in onLayout() local 228 int previewHeight = height; in onLayout() 231 previewHeight = mPreviewSize.height; in onLayout() 235 if (width * previewHeight > height * previewWidth) { in onLayout() 236 final int scaledChildWidth = previewWidth * height / previewHeight; in onLayout() 238 (width + scaledChildWidth) / 2, height); in onLayout() local [all …]
|
D | FrameBufferObjectActivity.java | 80 public void onSurfaceChanged(GL10 gl, int width, int height) { in onSurfaceChanged() argument 83 mSurfaceHeight = height; 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 | 114 int height = 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 136 ByteBuffer image = ByteBuffer.allocateDirect(height * stride) in createImage() 140 for (int t = 0; t < height; t++) { in createImage()
|
/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() 56 mRatioHeight = height; in setAspectRatio() 64 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 66 setMeasuredDimension(width, height); in onMeasure() 68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 71 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); 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() 56 mRatioHeight = height; in setAspectRatio() 64 int height = MeasureSpec.getSize(heightMeasureSpec); in onMeasure() local 66 setMeasuredDimension(width, height); in onMeasure() 68 if (width < height * mRatioWidth / mRatioHeight) { in onMeasure() 71 setMeasuredDimension(height * mRatioWidth / mRatioHeight, height); in onMeasure()
|
/development/samples/devbytes/graphics/ImagePixelization/src/com/example/android/imagepixelization/ |
D | ImagePixelization.java | 158 int height = bitmap.getHeight(); 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() 167 int yPixels = (int) (pixelizationFactor * ((float)height)); in customImagePixelization() 171 int[] bitmapPixels = new int[width * height]; in customImagePixelization() 172 bitmap.getPixels(bitmapPixels, 0, width, 0, 0, width, height); in customImagePixelization() 178 for (int y = 0; y < height; y+=yPixels) { in customImagePixelization() 184 maxY = Math.min(y + yPixels, height); in customImagePixelization() 201 int h = Math.min(yPixels, height - y); in customImagePixelization() 219 int height = bitmap.getHeight(); in builtInPixelization() local [all …]
|
/development/samples/browseable/HdrViewfinder/src/com.example.android.hdrviewfinder/ |
D | FixedAspectSurfaceView.java | 90 int height = MeasureSpec.getSize(heightMeasureSpec); 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() 143 height = View.resolveSizeAndState(height, heightMeasureSpec, 0); in onMeasure() 146 setMeasuredDimension(width, height); in onMeasure()
|
/development/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/ |
D | LabelMaker.java | 201 int height = Math.max(minHeight, textHeight + padHeight); in add() local 203 int effectiveTextHeight = height - padHeight; in add() 228 lineHeight = Math.max(lineHeight, height); in add() 235 int v2 = v + height; in add() 238 background.setBounds(u, v, u + width, v + height); in add() 253 mLabels.add(new Label(width, height, ascent, in add() 254 u, v + height, width, -height)); in add() 290 return mLabels.get(labelID).height; in getHeight() 346 (int) label.width, (int) label.height); in draw() 371 public Label(float width, float height, float baseLine, in Label() argument [all …]
|
D | MatrixTrackingGL.java | 147 int internalformat, int width, int height, int border, in glCompressedTexImage2D() argument 150 height, border, imageSize, data); in glCompressedTexImage2D() 154 int yoffset, int width, int height, int format, int imageSize, in glCompressedTexSubImage2D() argument 157 height, format, imageSize, data); in glCompressedTexSubImage2D() 161 int x, int y, int width, int height, int border) { in glCopyTexImage2D() argument 163 height, border); in glCopyTexImage2D() 167 int yoffset, int x, int y, int width, int height) { in glCopyTexSubImage2D() argument 169 height); in glCopyTexSubImage2D() 536 public void glReadPixels(int x, int y, int width, int height, int format, in glReadPixels() argument 538 mgl.glReadPixels(x, y, width, height, format, type, pixels); in glReadPixels() [all …]
|
/development/samples/training/InteractiveChart/src/com/example/android/interactivechart/ |
D | InteractiveLineGraphView.java | 334 mContentRect.height() / mLabelHeight / 2, in drawAxes() 527 - mContentRect.height() in getDrawY() 528 * (y - mCurrentViewport.top) / mCurrentViewport.height(); in getDrawY() 568 mEdgeEffectTop.setSize(mContentRect.width(), mContentRect.height()); 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() 635 + mCurrentViewport.height() in hitTest() 636 * (y - mContentRect.bottom) / -mContentRect.height()); in hitTest() 673 float newHeight = lastSpanY / spanY * mCurrentViewport.height(); [all …]
|
/development/samples/browseable/SwipeRefreshMultipleViews/src/com.example.android.common/view/ |
D | SlidingTabStrip.java | 118 final int height = getHeight(); in onDraw() local 120 final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); in onDraw() 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 149 height, mSelectedIndicatorPaint); in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 156 int separatorTop = (height - dividerHeightPx) / 2; in onDraw()
|
/development/samples/browseable/SwipeRefreshListFragment/src/com.example.android.common/view/ |
D | SlidingTabStrip.java | 118 final int height = getHeight(); in onDraw() local 120 final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); in onDraw() 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 149 height, mSelectedIndicatorPaint); in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 156 int separatorTop = (height - dividerHeightPx) / 2; in onDraw()
|
/development/samples/browseable/BasicTransition/src/com.example.android.common/view/ |
D | SlidingTabStrip.java | 118 final int height = getHeight(); in onDraw() local 120 final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); in onDraw() 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 149 height, mSelectedIndicatorPaint); in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 156 int separatorTop = (height - dividerHeightPx) / 2; in onDraw()
|
/development/samples/browseable/SlidingTabsColors/src/com.example.android.common/view/ |
D | SlidingTabStrip.java | 118 final int height = getHeight(); in onDraw() local 120 final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); in onDraw() 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 149 height, mSelectedIndicatorPaint); in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 156 int separatorTop = (height - dividerHeightPx) / 2; in onDraw()
|
/development/samples/browseable/SwipeRefreshLayoutBasic/src/com.example.android.common/view/ |
D | SlidingTabStrip.java | 118 final int height = getHeight(); in onDraw() local 120 final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); in onDraw() 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 149 height, mSelectedIndicatorPaint); in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 156 int separatorTop = (height - dividerHeightPx) / 2; in onDraw()
|
/development/samples/browseable/SlidingTabsBasic/src/com.example.android.common/view/ |
D | SlidingTabStrip.java | 118 final int height = getHeight(); in onDraw() local 120 final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height); in onDraw() 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 149 height, mSelectedIndicatorPaint); in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 156 int separatorTop = (height - dividerHeightPx) / 2; in onDraw()
|
/development/samples/browseable/DisplayingBitmaps/src/com.example.android.displayingbitmaps/util/ |
D | ImageResizer.java | 70 public void setImageSize(int width, int height) { in setImageSize() argument 72 mImageHeight = height; in setImageSize() 235 final int height = options.outHeight; in calculateInSampleSize() local 239 if (height > reqHeight || width > reqWidth) { in calculateInSampleSize() 241 final int halfHeight = height / 2; in calculateInSampleSize() 257 long totalPixels = width * height / inSampleSize; in calculateInSampleSize()
|
/development/samples/browseable/MediaRecorder/src/com.example.android.common.media/ |
D | CameraHelper.java | 76 double ratio = (double) size.width / size.height; in getOptimalVideoSize() 79 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 81 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize() 89 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 91 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize()
|
/development/samples/browseable/BasicRenderScript/src/com.example.android.common.media/ |
D | CameraHelper.java | 76 double ratio = (double) size.width / size.height; in getOptimalVideoSize() 79 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 81 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize() 89 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 91 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize()
|
/development/samples/browseable/BasicMediaDecoder/src/com.example.android.common.media/ |
D | CameraHelper.java | 76 double ratio = (double) size.width / size.height; in getOptimalVideoSize() 79 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 81 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize() 89 if (Math.abs(size.height - targetHeight) < minDiff && previewSizes.contains(size)) { in getOptimalVideoSize() 91 minDiff = Math.abs(size.height - targetHeight); in getOptimalVideoSize()
|