本文整理汇总了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);
}