當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。