Searched refs:scale (Results 76 - 100 of 261) sorted by relevance

1234567891011

/frameworks/base/core/jni/android/graphics/
H A DNinePatch.cpp101 SkScalar scale = destDensity / (float)srcDensity; local
103 canvas->scale(scale, scale);
105 bounds.fRight = (bounds.fRight-bounds.fLeft) / scale;
106 bounds.fBottom = (bounds.fBottom-bounds.fTop) / scale;
H A DRegion.cpp164 // Scale the rectangle by given scale and set the reuslt to the dst.
165 static void scale_rect(SkIRect* dst, const SkIRect& src, float scale) { argument
166 dst->fLeft = (int)::roundf(src.fLeft * scale);
167 dst->fTop = (int)::roundf(src.fTop * scale);
168 dst->fRight = (int)::roundf(src.fRight * scale);
169 dst->fBottom = (int)::roundf(src.fBottom * scale);
172 // Scale the region by given scale and set the reuslt to the dst.
174 static void scale_rgn(SkRegion* dst, const SkRegion& src, float scale) { argument
180 scale_rect(&r, iter.rect(), scale);
186 static void Region_scale(JNIEnv* env, jobject region, jfloat scale, jobjec argument
189 scale_rgn(GetSkRegion(env, dst), *rgn, scale); local
[all...]
/frameworks/base/graphics/java/android/graphics/
H A DRegion.java231 * Scale the region by the given scale amount. This re-constructs new region by
234 * in less internal rects if 0 < scale < 1. Zero and Negative scale result in
239 public void scale(float scale) { argument
240 scale(scale, null);
244 * Set the dst region to the result of scaling this region by the given scale amount.
248 public native void scale(float scale, Regio argument
[all...]
/frameworks/base/core/java/android/gesture/
H A DGesture.java240 final float scale = sx > sy ? sy : sx;
241 paint.setStrokeWidth(2.0f / scale);
243 path.offset(-bounds.left + (width - bounds.width() * scale) / 2.0f,
244 -bounds.top + (height - bounds.height() * scale) / 2.0f);
247 canvas.scale(scale, scale);
H A DGestureUtils.java103 float scale = sx < sy ? sx : sy;
104 sx = scale;
105 sy = scale;
113 float scale = sx < sy ? sx : sy;
114 sx = scale;
115 sy = scale;
118 float scale = sy * NONUNIFORM_SCALE;
119 if (scale < sx) {
120 sx = scale;
123 float scale
585 static float[] scale(float[] points, float sx, float sy) { method in class:GestureUtils
[all...]
H A DGestureStroke.java168 float scale = sx > sy ? sy : sx;
169 GestureUtils.scale(pts, scale, scale);
/frameworks/base/core/tests/coretests/src/android/text/
H A DStaticLayoutTest.java180 fmi.top, fmi.descent + s.scale(fmi.descent - fmi.top),
181 fmi.ascent, fmi.descent + s.scale(fmi.descent - fmi.ascent),
182 fmi.ascent, fmi.bottom + s.scale(fmi.bottom - fmi.ascent));
202 fmi.top, fmi.descent + s.scale(fmi.descent - fmi.top),
203 fmi.ascent, fmi.descent + s.scale(fmi.descent - fmi.ascent),
204 fmi.ascent, fmi.bottom + s.scale(fmi.bottom - fmi.ascent));
209 // Models the effect of the scale and add parameters. I think the current
220 public int scale(float height) { method in class:StaticLayoutTest.Scaler
224 Log.i("Scale", "expected scale: " + rndVal +
225 " != returned scale
[all...]
/frameworks/base/tests/DpiTest/src/com/google/android/test/dpi/
H A DDpiTestActivity.java164 private void addBitmapDrawable(LinearLayout layout, int resource, boolean scale) { argument
166 bitmap = loadAndPrintDpi(resource, scale);
171 if (!scale) d.setTargetDensity(getResources().getDisplayMetrics());
190 private void addCanvasBitmap(LinearLayout layout, int resource, boolean scale) { argument
192 bitmap = loadAndPrintDpi(resource, scale);
214 private Bitmap loadAndPrintDpi(int id, boolean scale) { argument
216 if (scale) {
/frameworks/base/core/java/android/widget/
H A DAbsSeekBar.java387 void onProgressRefresh(float scale, boolean fromUser, int progress) { argument
388 super.onProgressRefresh(scale, fromUser, progress);
392 setThumbPos(getWidth(), thumb, scale, Integer.MIN_VALUE);
451 * @param scale Current progress between 0 and 1
455 private void setThumbPos(int w, Drawable thumb, float scale, int offset) { argument
464 final int thumbPos = (int) (scale * available + 0.5f);
641 float scale;
645 scale = 0.0f;
647 scale = 1.0f;
649 scale
[all...]
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/views/
H A DTaskStackViewLayoutAlgorithm.java37 static final float StackPeekMinScale = 0.8f; // The min scale of the last card in the peek area
118 // Note that we should account for the scale difference of the offsets at the screen bottom
123 float scale = curveProgressToScale(pWithinAffiliateTop);
124 int scaleYOffset = (int) (((1f - scale) * taskHeight) / 2);
252 float scale = curveProgressToScale(pBounded);
253 int scaleYOffset = (int) (((1f - scale) * mTaskRect.height()) / 2);
256 transformOut.scale = scale;
262 Utilities.scaleRectAboutCenter(transformOut.rect, transformOut.scale);
364 /** Converts from the progress along the curve to a scale
[all...]
/frameworks/support/v4/kitkat/android/support/v4/print/
H A DPrintHelperKitkat.java115 * Returns the scale mode with which the image will fill the paper.
117 * @return The scale Mode: {@link #SCALE_MODE_FIT} or
285 // Compute and apply scale to fill the page.
286 float scale = content.width() / imageWidth;
288 scale = Math.max(scale, content.height() / imageHeight);
290 scale = Math.min(scale, content.height() / imageHeight);
292 matrix.postScale(scale, scale);
[all...]
/frameworks/base/core/java/android/view/animation/
H A DScaleAnimation.java26 * An animation that controls the scale of an object. You can specify the point
244 float scale = getScaleFactor();
256 t.getMatrix().setScale(sx, sy, scale * mPivotX, scale * mPivotY);
260 float resolveScale(float scale, int type, int data, int size, int psize) { argument
267 return scale;
/frameworks/opt/photoviewer/src/com/android/ex/photo/
H A DPhotoViewController.java150 /** The temporary image so that we can quickly scale up the fullscreen thumbnail */
168 /** The maximum scale factor applied to images when they are initially displayed */
270 // Set the max initial scale, defaulting to 1x
323 // We are not running the scale up animation. Just let the fragments
933 // We need to take a full screen image, and scale/translate it so that
940 final float scale = Math.max(scaleW, scaleY);
943 totalWidth, scale);
945 totalHeight, scale);
953 mTemporaryImage.setScaleX(scale);
954 mTemporaryImage.setScaleY(scale);
1097 calculateTranslate(int start, int startSize, int totalSize, float scale) argument
[all...]
/frameworks/av/media/libstagefright/
H A DClockEstimator.cpp77 void WindowedLinearFitEstimator::LinearFit::scale(double w) { function in class:android::WindowedLinearFitEstimator::LinearFit
112 mHead.scale(mHeadFactorInv); // amplify head
132 mTail.scale(mTailFactor); // attenuate tail
H A DVBRISeeker.cpp79 size_t scale = U16_AT(&vbriHeader[20]); local
81 ALOGV("%zu entries, scale=%zu, size_per_entry=%zu",
83 scale,
121 numBytes *= scale;
/frameworks/av/media/libstagefright/codecs/aacenc/SampleCode/
H A DAAC_E_SAMPLES.c115 int scale = 441; local
117 scale = 480;
118 param->bitRate = 640*param->nChannels*param->sampleRate/scale;
/frameworks/opt/bitmap/src/com/android/bitmap/drawable/
H A DCircularBitmapDrawable.java142 float scale = Math.max((float) dst.width() / src.width(),
144 mMatrix.postScale(scale, scale);
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
H A DScaleFrameLayout.java24 * Subclass of FrameLayout that support scale layout area size for children.
145 private static int getScaledMeasureSpec(int measureSpec, float scale) { argument
146 return scale == 1f ? measureSpec : MeasureSpec.makeMeasureSpec(
147 (int) (MeasureSpec.getSize(measureSpec) / scale + 0.5f),
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
H A DStatusBarIconView.java69 // We do not resize and scale system icons (on the right), only notification icons (on the
74 final float scale = (float)imageBounds / (float)outerBounds;
75 setScaleX(scale);
76 setScaleY(scale);
93 final float scale = (float)imageBounds / (float)outerBounds;
94 setScaleX(scale);
95 setScaleY(scale);
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
H A DLines2Activity.java106 canvas.scale(2, 2);
115 canvas.scale(2, 2);
124 canvas.scale(2, 2);
134 canvas.scale(2, 2);
143 canvas.scale(2, 2);
152 canvas.scale(2, 2);
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/imageproc/
H A DBlackWhiteFilter.java52 "uniform float scale;\n" +
79 " vec3 xform = clamp((color.rgb - black) * scale, 0.0, 1.0);\n" +
80 " vec3 temp = clamp((color.rgb + stepsize - black) * scale, 0.0, 1.0);\n" +
118 float scale = (mBlack != mWhite) ? 1.0f / (mWhite - mBlack) : 2000f;
121 mProgram.setHostValue("scale", scale);
/frameworks/base/media/mca/filterpacks/native/base/
H A Dvec_types.h99 Vec<T, dim> operator * (const Vec<T,dim> &x, T scale) { argument
102 out.data[i] = x.data[i] * scale;
107 Vec<T, dim> operator / (const Vec<T,dim> &x, T scale) { argument
110 out.data[i] = x.data[i] / scale;
/frameworks/base/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/
H A DCompoundTransform.java115 public ScaleComponent(String name, Float3 scale) { argument
117 setValue(scale);
149 public ScaleComponent addScale(String name, Float3 scale) { argument
150 ScaleComponent c = new ScaleComponent(name, scale);
/frameworks/rs/
H A DrsMatrix4x4.h69 void scale(float x, float y, float z) { function in struct:android::renderscript::Matrix4x4
/frameworks/base/libs/hwui/
H A DMatrix.cpp233 double scale = 1.0 / local
242 v.data[kTranslateY] * v.data[kPerspective1]) * scale;
244 v.data[kSkewX] * v.data[kPerspective2]) * scale;
246 v.data[kTranslateX] * v.data[kScaleY]) * scale;
249 v.data[kSkewY] * v.data[kPerspective2]) * scale;
251 v.data[kTranslateX] * v.data[kPerspective0]) * scale;
253 v.data[kScaleX] * v.data[kTranslateY]) * scale;
256 v.data[kScaleY] * v.data[kPerspective0]) * scale;
258 v.data[kScaleX] * v.data[kPerspective1]) * scale;
260 v.data[kSkewX] * v.data[kSkewY]) * scale;
[all...]

Completed in 878 milliseconds

1234567891011