Home
last modified time | relevance | path

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

12345

/packages/apps/Launcher2/src/com/android/launcher2/
DUtilities.java69 static Bitmap centerToFit(Bitmap bitmap, int width, int height, Context context) { in centerToFit() argument
73 if (bitmapWidth < width || bitmapHeight < height) { in centerToFit()
76 Bitmap centered = Bitmap.createBitmap(bitmapWidth < width ? width : bitmapWidth, in centerToFit()
81 canvas.drawBitmap(bitmap, (width - bitmapWidth) / 2.0f, (height - bitmapHeight) / 2.0f, in centerToFit()
107 int width = sIconWidth; in createIconThumbnail() local
112 painter.setIntrinsicWidth(width); in createIconThumbnail()
126 if (width < iconWidth || height < iconHeight) { in createIconThumbnail()
130 height = (int) (width / ratio); in createIconThumbnail()
132 width = (int) (height * ratio); in createIconThumbnail()
146 final int x = (sIconWidth - width) / 2; in createIconThumbnail()
[all …]
DDragView.java66 int left, int top, int width, int height) { in DragView() argument
74 float scaleFactor = width; in DragView()
78 mBitmap = Bitmap.createBitmap(bitmap, left, top, width, height, scale, true); in DragView()
101 float width = mBitmap.getWidth(); in onDraw() local
102 float offset = (width-(width*scale))/2; in onDraw()
/packages/apps/Launcher/src/com/android/launcher/
DUtilities.java67 int width = sIconWidth; in createIconThumbnail() local
73 painter.setIntrinsicWidth(width); in createIconThumbnail()
86 if (width > 0 && height > 0) { in createIconThumbnail()
87 if (width < iconWidth || height < iconHeight || scale != 1.0f) { in createIconThumbnail()
91 height = (int) (width / ratio); in createIconThumbnail()
93 width = (int) (height * ratio); in createIconThumbnail()
107 final int x = (sIconWidth - width) / 2; in createIconThumbnail()
109 icon.setBounds(x, y, x + width, y + height); in createIconThumbnail()
113 } else if (iconWidth < width && iconHeight < height) { in createIconThumbnail()
119 final int x = (width - iconWidth) / 2; in createIconThumbnail()
[all …]
/packages/wallpapers/Basic/res/raw/
Dgrass.rs63 void drawNight(int width, int height) {
68 width, -32.0f, 0.0f,
70 width, 1024.0f - 32.0f, 0.0f,
76 void drawSunrise(int width, int height) {
78 drawRect(0.0f, 0.0f, width, height, 0.0f);
81 void drawNoon(int width, int height) {
83 drawRect(0.0f, 0.0f, width, height, 0.0f);
86 void drawSunset(int width, int height) {
88 drawRect(0.0f, 0.0f, width, height, 0.0f);
215 int width = State->width;
[all …]
Ddistort.rs58 int offset(int x, int y, int width) {
59 return x + 1 + (y + 1) * (width + 2);
72 float width = State->glWidth;
78 leaf->x = randf2(-width * 0.5f, width * 0.5f);
94 int width = State->meshWidth;
99 if (x >= width - r) x = width - r - 1;
102 x = width - x;
106 int origin = offset(0, 0, width);
115 int yn = origin + (y - h) * (width + 2);
116 int yp = origin + (y + h) * (width + 2);
[all …]
Dgalaxy.rs104 float scale = State->galaxyRadius / (State->width * 0.5f);
114 void drawSpace(float xOffset, int width, int height) {
118 width, 0.0f, 0.0f, 2.0f, 1.0f,
119 width, height, 0.0f, 2.0f, 0.0f,
123 void drawLights(float xOffset, int width, int height) {
128 float scale = 512.0f / width;
140 void drawParticles(float xOffset, float offset, int width, int height) {
189 int width = State->width;
195 drawSpace(x, width, height);
197 drawParticles(x, offset, width, height);
[all …]
/packages/apps/Mms/src/com/android/mms/model/
DRegionModel.java31 int width, int height) { in RegionModel() argument
32 this(regionId, DEFAULT_FIT, left, top, width, height); in RegionModel()
36 int width, int height) { in RegionModel() argument
37 this(regionId, fit, left, top, width, height, null); in RegionModel()
41 int width, int height, String bgColor) { in RegionModel() argument
46 mWidth = width; in RegionModel()
113 public void setWidth(int width) { in setWidth() argument
114 mWidth = width; in setWidth()
/packages/inputmethods/PinyinIME/src/com/android/inputmethod/pinyin/
DBalloonHint.java141 boolean textBold, int textColor, int width, int height) { in setBalloonConfig() argument
143 setBalloonSize(width, height); in setBalloonConfig()
157 public void setBalloonConfig(Drawable icon, int width, int height) { in setBalloonConfig() argument
159 setBalloonSize(width, height); in setBalloonConfig()
199 int width, int height) { in delayedUpdate() argument
207 + mParentLocationInWindow[1], width, height); in delayedUpdate()
210 locationInParent, width, height); in delayedUpdate()
236 private void setBalloonSize(int width, int height) { in setBalloonSize() argument
237 int widthMeasureSpec = MeasureSpec.makeMeasureSpec(width, in setBalloonSize()
286 int width, int height) { in startTimer() argument
[all …]
/packages/apps/Camera/src/com/android/camera/
DHighlightView.java88 float width = mDrawRect.width(); in draw() local
90 path.addCircle(mDrawRect.left + (width / 2), in draw()
92 width / 2, in draw()
108 int width = mResizeDrawableDiagonal.getIntrinsicWidth(); in draw() local
112 * (mDrawRect.width() / 2D)); in draw()
114 + (mDrawRect.width() / 2) + d - width / 2; in draw()
187 int radius = mDrawRect.width() / 2; in getHit()
246 moveBy(dx * (mCropRect.width() / r.width()), in handleMotion()
258 float xDelta = dx * (mCropRect.width() / r.width()); in handleMotion()
300 if (dx > 0F && r.width() + 2 * dx > mImageRect.width()) { in growBy()
[all …]
/packages/apps/Gallery/src/com/android/camera/
DHighlightView.java90 float width = mDrawRect.width(); in draw() local
92 path.addCircle(mDrawRect.left + (width / 2), in draw()
94 width / 2, in draw()
110 int width = mResizeDrawableDiagonal.getIntrinsicWidth(); in draw() local
114 * (mDrawRect.width() / 2D)); in draw()
116 + (mDrawRect.width() / 2) + d - width / 2; in draw()
189 int radius = mDrawRect.width() / 2; in getHit()
248 moveBy(dx * (mCropRect.width() / r.width()), in handleMotion()
260 float xDelta = dx * (mCropRect.width() / r.width()); in handleMotion()
302 if (dx > 0F && r.width() + 2 * dx > mImageRect.width()) { in growBy()
[all …]
/packages/apps/Mms/src/com/android/mms/ui/
DAdaptableSlideViewInterface.java27 void setTextRegion(int left, int top, int width, int height); in setTextRegion() argument
31 void setImageRegion(int left, int top, int width, int height); in setImageRegion() argument
35 void setVideoRegion(int left, int top, int width, int height); in setVideoRegion() argument
43 void onSizeChanged(int width, int height); in onSizeChanged() argument
/packages/wallpapers/Basic/src/com/android/wallpaper/fall/
DFallRS.java97 public FallRS(int width, int height) { in FallRS() argument
98 super(width, height); in FallRS()
114 addDrop(x + (mWorldState.width * mWorldState.xOffset), y); in onCommand()
116 addDrop(x + (mWorldState.width * mWorldState.xOffset), y); in onCommand()
125 final int width = worldState.width; in start() local
126 final int x = width / 4 + (int)(Math.random() * (width / 2)); in start()
128 addDrop(x + (width * worldState.xOffset), y); in start()
132 public void resize(int width, int height) { in resize() argument
133 super.resize(width, height); in resize()
135 mWorldState.width = width; in resize()
[all …]
/packages/wallpapers/MusicVisualization/src/com/android/musicvis/
DRenderScriptWallpaper.java31 protected abstract T createScene(int width, int height); in createScene() argument
74 public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) { in onSurfaceChanged() argument
75 super.onSurfaceChanged(holder, format, width, height); in onSurfaceChanged()
77 mRs.contextSetSurface(width, height, holder.getSurface()); in onSurfaceChanged()
80 mRenderer = createScene(width, height); in onSurfaceChanged()
84 mRenderer.resize(width, height); in onSurfaceChanged()
DRenderScriptScene.java33 public RenderScriptScene(int width, int height) { in RenderScriptScene() argument
34 mWidth = width; in RenderScriptScene()
79 public void resize(int width, int height) { in resize() argument
80 mWidth = width; in resize()
DGenericWaveRS.java56 public int width; field in GenericWaveRS.WorldState
88 protected GenericWaveRS(int width, int height, int texid) { in GenericWaveRS() argument
89 super(width, height); in GenericWaveRS()
91 mWidth = width; in GenericWaveRS()
107 public void resize(int width, int height) { in resize() argument
108 super.resize(width, height); in resize()
109 mWorldState.width = width; in resize()
126 mWorldState.width = mWidth; in createScript()
/packages/wallpapers/MusicVisualization/src/com/android/musicvis/vis3/
DVisualization3RS.java44 Visualization3RS(int width, int height) { in Visualization3RS() argument
45 super(width, height, R.drawable.ice); in Visualization3RS()
91 final int width = mWidth; in update() local
96 for (int i = 0; i < width; i++) { in update()
102 if (cnt > width) { in update()
104 cnt -= width; in update()
/packages/wallpapers/Basic/src/com/android/wallpaper/
DRenderScriptWallpaper.java30 protected abstract T createScene(int width, int height); in createScene() argument
73 public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) { in onSurfaceChanged() argument
74 super.onSurfaceChanged(holder, format, width, height); in onSurfaceChanged()
76 mRs.contextSetSurface(width, height, holder.getSurface()); in onSurfaceChanged()
79 mRenderer = createScene(width, height); in onSurfaceChanged()
83 mRenderer.resize(width, height); in onSurfaceChanged()
DRenderScriptScene.java33 public RenderScriptScene(int width, int height) { in RenderScriptScene() argument
34 mWidth = width; in RenderScriptScene()
79 public void resize(int width, int height) { in resize() argument
80 mWidth = width; in resize()
/packages/wallpapers/MagicSmoke/src/com/android/magicsmoke/
DRenderScriptWallpaper.java32 protected abstract T createScene(int width, int height); in createScene() argument
75 public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) { in onSurfaceChanged() argument
76 super.onSurfaceChanged(holder, format, width, height); in onSurfaceChanged()
78 mRs.contextSetSurface(width, height, holder.getSurface()); in onSurfaceChanged()
81 mRenderer = createScene(width, height); in onSurfaceChanged()
85 mRenderer.resize(width, height); in onSurfaceChanged()
DRenderScriptScene.java33 public RenderScriptScene(int width, int height) { in RenderScriptScene() argument
34 mWidth = width; in RenderScriptScene()
79 public void resize(int width, int height) { in resize() argument
80 mWidth = width; in resize()
/packages/wallpapers/Basic/src/com/android/wallpaper/walkaround/
DWalkAroundWallpaper.java137 public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) { in onSurfaceChanged() argument
138 super.onSurfaceChanged(holder, format, width, height); in onSurfaceChanged()
175 size.width == metrics.heightPixels && size.height == metrics.widthPixels) || in startPreview()
177 size.width == metrics.widthPixels && size.height == metrics.heightPixels)) { in startPreview()
178 params.setPreviewSize(size.width, size.height); in startPreview()
186 if (size.width >= metrics.widthPixels && size.height >= metrics.heightPixels) { in startPreview()
187 params.setPreviewSize(size.width, size.height); in startPreview()
206 params.setPreviewSize(size.width, size.height); in startPreview()
/packages/wallpapers/MusicVisualization/src/com/android/musicvis/vis1/
DVisualization1.java102 public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) { in onSurfaceChanged() argument
103 super.onSurfaceChanged(holder, format, width, height); in onSurfaceChanged()
104 mWidth = width; in onSurfaceChanged()
105 mCenterX = width/2.0f; in onSurfaceChanged()
146 final int width = frame.width(); in drawFrame() local
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DPercentageBar.java58 int width = (int) ((this.getBounds().width() * percent) / 100); in getBarWidth() local
60 return Math.max(width, intrinsicWidth); in getBarWidth()
/packages/apps/Mms/src/com/android/mms/dom/smil/
DSmilRegionElementImpl.java88 int width = parseRegionLength(getAttribute(WIDTH_ATTRIBUTE_NAME), true); in getLeft() local
89 return bbw - right - width; in getLeft()
193 final int width = parseRegionLength(getAttribute(WIDTH_ATTRIBUTE_NAME), true); in getWidth() local
194 return width == 0 ? in getWidth()
196 width; in getWidth()
232 public void setWidth(int width) throws DOMException { in setWidth() argument
233 this.setAttribute(WIDTH_ATTRIBUTE_NAME, String.valueOf(width) + "px"); in setWidth()
/packages/apps/Settings/src/com/android/settings/
DActivityPicker.java349 int width = mIconWidth; in createIconThumbnail() local
361 painter.setIntrinsicWidth(width); in createIconThumbnail()
365 if (width > 0 && height > 0) { in createIconThumbnail()
366 if (width < iconWidth || height < iconHeight) { in createIconThumbnail()
370 height = (int) (width / ratio); in createIconThumbnail()
372 width = (int) (height * ratio); in createIconThumbnail()
386 final int x = (mIconWidth - width) / 2; in createIconThumbnail()
388 icon.setBounds(x, y, x + width, y + height); in createIconThumbnail()
392 } else if (iconWidth < width && iconHeight < height) { in createIconThumbnail()
398 final int x = (width - iconWidth) / 2; in createIconThumbnail()

12345