本文整理匯總了Java中android.graphics.drawable.shapes.Shape.resize方法的典型用法代碼示例。如果您正苦於以下問題:Java Shape.resize方法的具體用法?Java Shape.resize怎麽用?Java Shape.resize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.graphics.drawable.shapes.Shape
的用法示例。
在下文中一共展示了Shape.resize方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: PositionMarker
import android.graphics.drawable.shapes.Shape; //導入方法依賴的package包/類
public PositionMarker(MapWidget context, Object id, Drawable roundPointerDrawable, Drawable arrowPointerDrawable)
{
super(id, null, new Point(0, 0), false, false);
this.context = context;
accuracy = 500;
pixelsInMeter = 0;
hasBearing = false;
arrowPointerPivotPoint = null;
roundPointerPivotPoint= null;
this.context = context;
Shape accuracyShape = new OvalShape();
accuracyShape.resize(getAccuracyDiameter(), getAccuracyDiameter());
accuracyDrawable = new ShapeDrawable(accuracyShape);
this.roundPointerDrawable = roundPointerDrawable;
this.arrowPointerDrawable = arrowPointerDrawable;
Paint accuracyAreaPaint = accuracyDrawable.getPaint();
accuracyAreaPaint.setStyle(Style.FILL);
accuracyBorderPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
accuracyBorderPaint.setStyle(Style.STROKE);
setDrawable(roundPointerDrawable);
}
示例2: makeCharShape
import android.graphics.drawable.shapes.Shape; //導入方法依賴的package包/類
protected Drawable makeCharShape(float size, int color, Rect bounds) {
Shape shape = new OvalShape();
shape.resize(size, size);
ShapeDrawable drawable = new ShapeDrawable(shape);
drawable.getPaint().setColor(color);
drawable.getPaint().setFlags(Paint.ANTI_ALIAS_FLAG);
drawable.setBounds(bounds);
return drawable;
}
示例3: setWidth
import android.graphics.drawable.shapes.Shape; //導入方法依賴的package包/類
public void setWidth(float width) {
Shape s = shape.getShape();
s.resize(width, s.getHeight());
}
示例4: setHeight
import android.graphics.drawable.shapes.Shape; //導入方法依賴的package包/類
public void setHeight(float height) {
Shape s = shape.getShape();
s.resize(s.getWidth(), height);
}
示例5: setWidth
import android.graphics.drawable.shapes.Shape; //導入方法依賴的package包/類
public void setWidth(float width) {
Shape s = shape.getShape();
s.resize(width, s.getHeight());
}
示例6: setHeight
import android.graphics.drawable.shapes.Shape; //導入方法依賴的package包/類
public void setHeight(float height) {
Shape s = shape.getShape();
s.resize(s.getWidth(), height);
}
示例7: setWidth
import android.graphics.drawable.shapes.Shape; //導入方法依賴的package包/類
public void setWidth(float width) {
Shape s = shape.getShape();
s.resize(width, /*s.getHeight()*/width);
}
示例8: setHeight
import android.graphics.drawable.shapes.Shape; //導入方法依賴的package包/類
public void setHeight(float height) {
Shape s = shape.getShape();
s.resize(height/*s.getWidth()*/, height);
}