当前位置: 首页>>代码示例>>Java>>正文


Java Shape.resize方法代码示例

本文整理汇总了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);
}
 
开发者ID:lemberg,项目名称:mappwidget,代码行数:30,代码来源:PositionMarker.java

示例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;
}
 
开发者ID:venmo,项目名称:android-pin,代码行数:10,代码来源:PinputView.java

示例3: setWidth

import android.graphics.drawable.shapes.Shape; //导入方法依赖的package包/类
public void setWidth(float width) {
    Shape s = shape.getShape();
    s.resize(width, s.getHeight());
}
 
开发者ID:sdrausty,项目名称:buildAPKsSamples,代码行数:5,代码来源:ShapeHolder.java

示例4: setHeight

import android.graphics.drawable.shapes.Shape; //导入方法依赖的package包/类
public void setHeight(float height) {
    Shape s = shape.getShape();
    s.resize(s.getWidth(), height);
}
 
开发者ID:sdrausty,项目名称:buildAPKsSamples,代码行数:5,代码来源:ShapeHolder.java

示例5: setWidth

import android.graphics.drawable.shapes.Shape; //导入方法依赖的package包/类
public void setWidth(float width) {
	Shape s = shape.getShape();
	s.resize(width, s.getHeight());
}
 
开发者ID:CrazyRunning,项目名称:MyStudyHelper,代码行数:5,代码来源:BallView.java

示例6: setHeight

import android.graphics.drawable.shapes.Shape; //导入方法依赖的package包/类
public void setHeight(float height) {
	Shape s = shape.getShape();
	s.resize(s.getWidth(), height);
}
 
开发者ID:CrazyRunning,项目名称:MyStudyHelper,代码行数:5,代码来源:BallView.java

示例7: setWidth

import android.graphics.drawable.shapes.Shape; //导入方法依赖的package包/类
public void setWidth(float width) {
    Shape s = shape.getShape();
    s.resize(width, /*s.getHeight()*/width);
}
 
开发者ID:androidertc,项目名称:iLocker,代码行数:5,代码来源:FlowerHolder.java

示例8: setHeight

import android.graphics.drawable.shapes.Shape; //导入方法依赖的package包/类
public void setHeight(float height) {
    Shape s = shape.getShape();
    s.resize(height/*s.getWidth()*/, height);
}
 
开发者ID:androidertc,项目名称:iLocker,代码行数:5,代码来源:FlowerHolder.java


注:本文中的android.graphics.drawable.shapes.Shape.resize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。