项目:FiveMinsMore
文件:ClockDrawable.java
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
rimRadius = Math.min(bounds.width(),bounds.height()) / 2f - rimPaint.getstrokeWidth();
faceRadius = rimRadius - rimPaint.getstrokeWidth();
screwRadius = rimPaint.getstrokeWidth() * 2;
float hourHandLength = (float) (0.5 * faceRadius);
float minuteHandLength = (float) (0.7 * faceRadius);
float top = bounds.centerY() - screwRadius;
hourHandpath.reset();
hourHandpath.moveto(bounds.centerX(),bounds.centerY());
hourHandpath.addRect(bounds.centerX(),top,bounds.centerX(),top - hourHandLength,Direction.ccw);
hourHandpath.close();
minuteHandpath.reset();
minuteHandpath.moveto(bounds.centerX(),bounds.centerY());
minuteHandpath.addRect(bounds.centerX(),top - minuteHandLength,Direction.ccw);
minuteHandpath.close();
}
public void setupCropBounds() {
int height = (int) (((float) this.mThisWidth) / this.mTargetAspectRatio);
int halfDiff;
if (height > this.mThisHeight) {
int width = (int) (((float) this.mThisHeight) * this.mTargetAspectRatio);
halfDiff = (this.mThisWidth - width) / 2;
this.mCropViewRect.set((float) (getPaddingLeft() + halfDiff),(float) getPaddingTop(),(float) ((getPaddingLeft() + width) + halfDiff),(float) (getPaddingTop() +
this.mThisHeight));
} else {
halfDiff = (this.mThisHeight - height) / 2;
this.mCropViewRect.set((float) getPaddingLeft(),(float) (getPaddingTop() + halfDiff),(float) (getPaddingLeft() + this.mThisWidth),(float) ((getPaddingTop() +
height) + halfDiff));
}
this.mGridPoints = null;
this.mCircularPath.reset();
this.mCircularPath.addoval(this.mCropViewRect,Direction.CW);
}
public void draw(Canvas canvas) {
boolean positionChanged = adapterPositionChanged();
if (this.rippleOverlay) {
if (!positionChanged) {
this.rippleBackground.draw(canvas);
}
super.draw(canvas);
if (!positionChanged) {
if (this.rippleRoundedCorners != 0.0f) {
Path clipPath = new Path();
clipPath.addRoundRect(new RectF(0.0f,0.0f,(float) canvas.getWidth(),(float) canvas.getHeight()),this.rippleRoundedCorners,Direction.CW);
canvas.clipPath(clipPath);
}
canvas.drawCircle((float) this.currentCoords.x,(float) this.currentCoords.y,this.radius,this.paint);
return;
}
return;
}
if (!positionChanged) {
this.rippleBackground.draw(canvas);
canvas.drawCircle((float) this.currentCoords.x,this.paint);
}
super.draw(canvas);
}
private void drawOutSideText(Canvas canvas) {
Paint textPaint = new Paint();
textPaint.setColor(this.mnormalGray);
textPaint.setAntiAlias(true);
textPaint.setTextSize(getResources().getDimension(R.dimen.out_indicator_size));
int radius = getViewRadius() - this.mDividerWidth;
Path path = new Path();
path.addCircle((float) getCenterX(),(float) getCenterY(),(float) radius,Direction.CW);
if (this.mDividerIndicator.size() != 0) {
String content = BaseCircle.formatNumber(this.mStartIndicator);
canvas.drawTextOnPath(content,path,ViewUtils.getCirclePathLength((float) radius,135.0f) - ((float) (ViewUtils.getTextWidth(textPaint,content) / 2)),textPaint);
float perAngle = 270.0f / (this.mEndindicator - this.mStartIndicator);
for (IndicatorItem item : this.mDividerIndicator) {
content = BaseCircle.formatNumber(item.end);
canvas.drawTextOnPath(content,ViewUtils.getCirclePathLength((float)
radius,((item.end - this.mStartIndicator) * perAngle) + 135.0f) - (
(float) (ViewUtils.getTextWidth(textPaint,textPaint);
}
}
}
private void updatePath(final int w,final int h) {
final float maxAbsSize = Math.min(w,h) / 2f;
final float absSize = size < maxSize ? maxAbsSize * size / maxSize : maxAbsSize - 1;
path.reset();
if (progress == 0) {
path.close();
} else if (progress < maxProgress) {
final float angle = progress * 360 / maxProgress;
final float x = w / 2f;
final float y = h / 2f;
path.moveto(x,y);
path.arcTo(new RectF(x - absSize,y - absSize,x + absSize,y + absSize),270,angle);
path.close();
} else {
path.addCircle(w / 2f,h / 2f,absSize,Direction.CW);
}
}
@Override
protected void onBoundsChange(Rect bounds) {
if(mBackgroundDrawable != null)
mBackgroundDrawable.setBounds(bounds);
mBackgroundBounds.set(bounds.left + mMask.left,bounds.top + mMask.top,bounds.right - mMask.right,bounds.bottom - mMask.bottom);
mBackground.reset();
switch (mMask.type) {
case Mask.TYPE_oval:
mBackground.addoval(mBackgroundBounds,Direction.CW);
break;
case Mask.TYPE_RECTANGLE:
mBackground.addRoundRect(mBackgroundBounds,mMask.cornerRadius,Direction.CW);
break;
}
}
项目:ClockDrawableAnimation
文件:ClockDrawable.java
项目:iOffice
文件:SmartArtPathBuilder.java
private static Path getFunnelPath(AutoShape shape,Rect rect)
{
float width = 716f;
float height = 536f;
path.addoval(new RectF(28,22,688,238),Direction.ccw);
path.moveto(0,130);
path.arcTo(new RectF(0,716,260),180,180);
path.arcTo(new RectF(258,444,458,536),30,150);
path.close();
sm.reset();
sm.postScale(rect.width() / width,rect.height() / height);
path.transform(sm);
path.offset(rect.left,rect.top);
return path;
}
项目:iOffice
文件:BaseShapePathBuilder.java
private static Path getFramePath(AutoShape shape,Rect rect)
{
float x = Math.min(rect.height(),rect.width()) * 0.1f;
Float[] values = shape.getAdjustData();
if (values != null && values.length >= 1)
{
if (values[0] != null)
{
x = Math.min(rect.height(),rect.width()) * values[0];
}
}
rectF.set(rect.left,rect.top,rect.right,rect.bottom);
path.addRect(rectF,Path.Direction.CW);
rectF.set(rect.left + x,rect.top + x,rect.right - x,rect.bottom - x);
path.addRect(rectF,Path.Direction.ccw);
return path;
}
private void updatePath(final int w,final int h)
{
final float maxAbsSize = Math.min(w,h) / 2f;
final float absSize = size < maxSize ? maxAbsSize * size / maxSize : maxAbsSize - 1;
path.reset();
if (progress == 0)
{
path.close();
}
else if (progress < maxProgress)
{
final float angle = progress * 360 / maxProgress;
final float x = w / 2f;
final float y = h / 2f;
path.moveto(x,angle);
path.close();
}
else
{
path.addCircle(w / 2f,Direction.CW);
}
}
@Override
protected void onBoundsChange(Rect bounds) {
if(mBackgroundDrawable != null)
mBackgroundDrawable.setBounds(bounds);
mBackgroundBounds.set(bounds.left + mMask.left,Direction.CW);
break;
}
}
@Override
protected void onBoundsChange(Rect bounds) {
if(mBackgroundDrawable != null)
mBackgroundDrawable.setBounds(bounds);
mBackgroundBounds.set(bounds.left + mMask.left,Direction.CW);
break;
}
}
/**
* Sets the bitmap to be used for the zoomed view.
*/
public void setBitmap(Bitmap bitmap) {
if (mZoomedBitmap != null) {
mZoomedBitmap.recycle();
mZoomedBitmap = null;
}
mZoomedBitmap = bitmap;
// Round the corners of the bitmap so it doesn't stick out around the overlay.
Canvas canvas = new Canvas(mZoomedBitmap);
Path path = new Path();
RectF canvasRect = new RectF(0,canvas.getWidth(),canvas.getHeight());
float overlayCornerRadius = getoverlayCornerRadius(getContext());
path.addRoundRect(canvasRect,overlayCornerRadius,Direction.ccw);
canvas.clipPath(path,Op.XOR);
Paint clearPaint = new Paint();
clearPaint.setXfermode(new PorterDuffXfermode(Mode.SRC));
clearPaint.setColor(Color.TRANSPARENT);
canvas.drawPaint(clearPaint);
}
@Override
protected void onBoundsChange(Rect bounds) {
if(mBackgroundDrawable != null)
mBackgroundDrawable.setBounds(bounds);
mBackgroundBounds.set(bounds.left + mMask.left,bounds.bottom - mMask.bottom);
mBackground.reset();
switch (mMask.type) {
case Mask.TYPE_oval:
mBackground.addoval(mBackgroundBounds,Direction.CW);
break;
case Mask.TYPE_RECTANGLE:
mBackground.addRoundRect(mBackgroundBounds,Direction.CW);
break;
}
}
@Override
protected void onBoundsChange(Rect bounds) {
if(mBackgroundDrawable != null)
mBackgroundDrawable.setBounds(bounds);
mBackgroundBounds.set(bounds.left + mMask.left,Direction.CW);
break;
}
}
private void updatePath(final int w,h) / 2f;
final float absSize = size < maxSize ? maxAbsSize * size / maxSize
: maxAbsSize - 1;
path.reset();
if (progress == 0) {
path.close();
} else if (progress < maxProgress) {
final float angle = progress * 360 / maxProgress;
final float x = w / 2f;
final float y = h / 2f;
path.moveto(x,y
+ absSize),Direction.CW);
}
}
项目:RoundedImageView
文件:RoundedImageView.java
@Override
protected void onDraw(Canvas canvas) {
float borderWidth = this.borderWidth;
float roundWidth = this.roundWidth;
if (borderWidth < 0) {
borderWidth = ( getWidth() + getHeight() ) * .02f;
}
paint.setstrokeWidth( borderWidth );
if (roundWidth < 0) {
roundWidth = borderWidth * 2;
}
drawPath.reset();
// drawRect.set( 0 + roundWidth / 2,0 + roundWidth / 2,getWidth() - roundWidth / 2,getHeight() - roundWidth / 2 );
drawRect.set( 0 + borderWidth / 2,0 + borderWidth / 2,getWidth() - borderWidth / 2,getHeight() - borderWidth / 2 );
drawPath.addRoundRect( drawRect,roundWidth,Direction.ccw );
canvas.save();
canvas.clipPath( drawPath );
super.onDraw( canvas );
canvas.restore();
canvas.drawRoundRect( drawRect,paint );
}
项目:EffectiveAndroid
文件:DrawPathDemoActivity.java
@Override
public void onDraw(Canvas canvas) {
if (mCenter == null) {
mCenter = new Point(getWidth()/2,getHeight()/2);
}
canvas.drawColor(Color.CYAN);
float left = mCenter.x;
float top = mCenter.y;
float radius = 200;
Path p = new Path();
p.addRect(left,left+radius,top+radius,Direction.CW);
p.addCircle(mCenter.x,mCenter.y,radius,Direction.CW);
p.lineto(mCenter.x + 2*radius,mCenter.y+2*radius);
p.close();
Paint paint = new Paint();
paint.setColor(Color.RED);
paint.setAntiAlias(true);
// paint.setStyle(Style.FILL_AND_stroke);
canvas.drawPath(p,paint);
}
private void updatePath(final int w,Direction.CW);
}
}
项目:android-chromium-view
文件:PopupZoomer.java
/**
* Sets the bitmap to be used for the zoomed view.
*/
public void setBitmap(Bitmap bitmap) {
if (mZoomedBitmap != null) {
mZoomedBitmap.recycle();
mZoomedBitmap = null;
}
mZoomedBitmap = bitmap;
// Round the corners of the bitmap so it doesn't stick out around the overlay.
Canvas canvas = new Canvas(mZoomedBitmap);
Path path = new Path();
RectF canvasRect = new RectF(0,Op.XOR);
Paint clearPaint = new Paint();
clearPaint.setXfermode(new PorterDuffXfermode(Mode.SRC));
clearPaint.setColor(Color.TRANSPARENT);
canvas.drawPaint(clearPaint);
}
项目:android-chromium
文件:PopupZoomer.java
/**
* Sets the bitmap to be used for the zoomed view.
*/
public void setBitmap(Bitmap bitmap) {
if (mZoomedBitmap != null) {
mZoomedBitmap.recycle();
mZoomedBitmap = null;
}
mZoomedBitmap = bitmap;
// Round the corners of the bitmap so it doesn't stick out around the overlay.
Canvas canvas = new Canvas(mZoomedBitmap);
Path path = new Path();
RectF canvasRect = new RectF(0,Op.XOR);
Paint clearPaint = new Paint();
clearPaint.setXfermode(new PorterDuffXfermode(Mode.SRC));
clearPaint.setColor(Color.TRANSPARENT);
canvas.drawPaint(clearPaint);
}
项目:chromium_webview
文件:PopupZoomer.java
/**
* Sets the bitmap to be used for the zoomed view.
*/
public void setBitmap(Bitmap bitmap) {
if (mZoomedBitmap != null) {
mZoomedBitmap.recycle();
mZoomedBitmap = null;
}
mZoomedBitmap = bitmap;
// Round the corners of the bitmap so it doesn't stick out around the overlay.
Canvas canvas = new Canvas(mZoomedBitmap);
Path path = new Path();
RectF canvasRect = new RectF(0,Op.XOR);
Paint clearPaint = new Paint();
clearPaint.setXfermode(new PorterDuffXfermode(Mode.SRC));
clearPaint.setColor(Color.TRANSPARENT);
canvas.drawPaint(clearPaint);
}
项目:FaceBarCodeDemo
文件:QRCodeGenerator.java
private void drawRoundRect(Canvas canvas,RectF rect,Paint paint,int radius,boolean leftTop,boolean rightTop,boolean leftBottom,boolean rightBottom) {
float roundRadius[] = new float[8];
roundRadius[0] = leftTop ? 0 : radius;
roundRadius[1] = leftTop ? 0 : radius;
roundRadius[2] = rightTop ? 0 : radius;
roundRadius[3] = rightTop ? 0 : radius;
roundRadius[4] = rightBottom ? 0 : radius;
roundRadius[5] = rightBottom ? 0 : radius;
roundRadius[6] = leftBottom ? 0 : radius;
roundRadius[7] = leftBottom ? 0 : radius;
Path path = new Path();
path.addRoundRect(rect,roundRadius,Direction.ccw);
canvas.drawPath(path,paint);
}
private void updatePath(final int w,Direction.CW);
}
}
项目:cordova-android-chromium
文件:PopupZoomer.java
/**
* Sets the bitmap to be used for the zoomed view.
*/
public void setBitmap(Bitmap bitmap) {
if (mZoomedBitmap != null) {
mZoomedBitmap.recycle();
mZoomedBitmap = null;
}
mZoomedBitmap = bitmap;
// Round the corners of the bitmap so it doesn't stick out around the overlay.
Canvas canvas = new Canvas(mZoomedBitmap);
Path path = new Path();
RectF canvasRect = new RectF(0,Op.XOR);
Paint clearPaint = new Paint();
clearPaint.setXfermode(new PorterDuffXfermode(Mode.SRC));
clearPaint.setColor(Color.TRANSPARENT);
canvas.drawPaint(clearPaint);
}
项目:NoticeDog
文件:CircleBackgroundMask.java
protected void onSizeChanged(int w,int h,int oldw,int oldh) {
float dy = ((float) h) - 2.0f;
float dx = (float) w;
float padding = (float) getPaddingLeft();
this.clipPath.reset();
this.clipPath.addCircle(dx / 2.0f,dy / 2.0f,(dx / 2.0f) - padding,Direction.CW);
this.clipPath.close();
}
项目:Tribe
文件:RoundImageView.java
项目:Tribe
文件:RoundImageView.java
@Override
public void buildBorderPath(Path borderPath) {
borderPath.reset();
final float halfBorderWidth = getBorderWidth() * 0.5f;
final int width = getWidth();
final int height = getHeight();
radius = Math.min(radius,height) * 0.5f);
RectF rect = new RectF(halfBorderWidth,halfBorderWidth,width - halfBorderWidth,height - halfBorderWidth);
borderPath.addRoundRect(rect,Direction.CW);
}
public void draw(Canvas canvas) {
canvas.save();
if (!this.mBoundsConfigured) {
configureBounds(canvas);
if (this.mBorderWidth > 0.0f) {
adjustBorderWidthAndBorderBounds(canvas);
setBorderRadii();
}
this.mBoundsConfigured = true;
}
if (this.moval) {
if (this.mBorderWidth > 0.0f) {
adjustCanvasForBorder(canvas);
this.mPath.addoval(this.mBounds,Direction.CW);
canvas.drawPath(this.mPath,this.mBitmapPaint);
this.mPath.reset();
this.mPath.addoval(this.mBorderBounds,this.mBorderPaint);
} else {
this.mPath.addoval(this.mBounds,this.mBitmapPaint);
}
} else if (this.mBorderWidth > 0.0f) {
adjustCanvasForBorder(canvas);
this.mPath.addRoundRect(this.mBounds,this.mRadii,Direction.CW);
canvas.drawPath(this.mPath,this.mBitmapPaint);
this.mPath.reset();
this.mPath.addRoundRect(this.mBorderBounds,this.mBorderRadii,this.mBorderPaint);
} else {
this.mPath.addRoundRect(this.mBounds,this.mBitmapPaint);
}
canvas.restore();
}
protected void drawBackground(Canvas canvas) {
Paint bgPaint = new Paint();
bgPaint.setColor(this.mCircleBackground);
int radius = getViewRadius() - ((this.mDividerWidth * 3) / 2);
canvas.drawCircle((float) getCenterX(),bgPaint);
Path path = new Path();
path.addCircle((float) getCenterX(),Direction.CW);
Paint paint = new Paint();
paint.setColor(this.mCircleGray);
paint.setAntiAlias(true);
paint.setStyle(Style.stroke);
paint.setstrokeWidth(1.0f);
canvas.drawPath(path,paint);
}
private void drawCircle(Canvas canvas) {
Paint textPaint = new Paint();
textPaint.setColor(this.mCircleWhite);
textPaint.setAntiAlias(true);
textPaint.setTextSize(getResources().getDimension(R.dimen.out_indicator_size));
float textHeight = (float) ViewUtils.getTextHeight(textPaint);
float perAngle = 270.0f / (this.mEndindicator - this.mStartIndicator);
int radius = (int) (((float) getViewRadius()) - (2.6f * ((float) this.mDividerWidth)));
FontMetricsInt fmi = textPaint.getFontMetricsInt();
float texTradius = (float) (radius - (Math.abs(fmi.bottom + fmi.top) / 2));
RectF oval = new RectF((float) (getCenterX() - radius),(float) (getCenterY() - radius),(float) (getCenterX() + radius),(float) (getCenterY() + radius));
Path path = new Path();
path.addCircle((float) getCenterX(),texTradius,Direction.CW);
Paint circlePaint = new Paint();
circlePaint.setAntiAlias(true);
circlePaint.setstrokeWidth(16.0f + textHeight);
circlePaint.setStyle(Style.stroke);
if (this.mDividerIndicator.size() == 0) {
circlePaint.setstrokeCap(Cap.ROUND);
circlePaint.setColor(this.mCircleGray);
canvas.drawArc(oval,135.0f,270.0f,false,circlePaint);
return;
}
circlePaint.setstrokeCap(Cap.ROUND);
drawCircleContent(canvas,(IndicatorItem) this.mDividerIndicator.get(0),oval,perAngle,textPaint,circlePaint);
Canvas canvas2 = canvas;
drawCircleContent(canvas2,(IndicatorItem) this.mDividerIndicator.get(this
.mDividerIndicator.size() - 1),circlePaint);
circlePaint.setstrokeCap(Cap.BUTT);
for (int i = 1; i < this.mDividerIndicator.size() - 1; i++) {
drawCircleContent(canvas,(IndicatorItem) this.mDividerIndicator.get(i),circlePaint);
}
}
项目:BubblePopupWindow
文件:BubbleRelativeLayout.java
@Override
protected void onDraw(Canvas canvas) {
final float width = canvas.getWidth();
final float height = canvas.getHeight();
mPath.rewind();
mPath.addRoundRect(new RectF(PADDING,PADDING,width - PADDING,height - PADDING),CORNER_RADIUS,Direction.CW);
mPath.addpath(mBubbleLegPrototype,renderBubbleLegMatrix(width,height));
canvas.drawPath(mPath,mPaint);
canvas.scale((width - stroke_WIDTH) / width,(height - stroke_WIDTH) / height,width / 2f,height / 2f);
canvas.drawPath(mPath,mFillPaint);
}
项目:memoir
文件:BulletSpan.java
项目:PowerToggles
文件:FolderIconCreater.java
public FolderIconCreater(Context c) {
mRes = c.getResources();
mSize = BitmapUtils.getActivityIconSize(c);
mIconSize = mSize * 3 / 5;
mRoundRect = new Path();
float gap = (mSize - mIconSize) * 0.25f;
mRoundRect.addRoundRect(new RectF(gap,gap,mSize - gap,mSize - gap),gap / 2,Direction.CW);
// Init variables
// cos(45) = 0.707 + ~= 0.1) = 0.8f
mBaselineIconScale = (1 + 0.8f) / (2 * (1 + PERSPECTIVE_SHIFT_FACTOR));
mBaselineIconSize = (int) (mSize * mBaselineIconScale);
mMaxPerspectiveShift = mBaselineIconSize * PERSPECTIVE_SHIFT_FACTOR;
}
private void invalidateRevealInfo() {
if (STRATEGY == CLIP_PATH) {
revealPath.rewind();
if (revealInfo != null) {
revealPath.addCircle(
revealInfo.centerX,revealInfo.centerY,revealInfo.radius,Direction.CW);
}
}
view.invalidate();
}
项目:iOffice
文件:XYChart.java
protected void drawSeriesBackgroundAndFrame(XYMultipleSeriesRenderer renderer,Canvas canvas,Rect rect,Paint paint)
{
int alpha = paint.getAlpha();
Path path = new Path();
path.addRect((float)rect.left,(float)rect.top,(float)rect.right,(float)rect.bottom,Direction.ccw);
// draw fill
BackgroundAndFill fill = renderer.getSeriesBackgroundColor();
if (fill != null)
{
paint.setStyle(Style.FILL);
BackgroundDrawer.drawPathBackground(canvas,null,1,fill,rect,1.0f,paint);
paint.setAlpha(alpha);
}
// draw border
Line frame = renderer.getSeriesFrame();
if (frame != null)
{
paint.setStyle(Style.stroke);
paint.setstrokeWidth(2);
if(frame.isDash())
{
DashPathEffect dashPathEffect = new DashPathEffect(new float[] {5,5},10);
paint.setPathEffect(dashPathEffect);
}
BackgroundDrawer.drawPathBackground(canvas,frame.getBackgroundAndFill(),paint);
paint.setStyle(Style.FILL);
paint.setAlpha(alpha);
}
paint.reset();
paint.setAntiAlias(true);
}
项目:iOffice
文件:AbstractChart.java
/**
* Draws the chart background.
*
* @param renderer the chart renderer
* @param canvas the canvas to paint to
* @param x the top left x value of the view to draw to
* @param y the top left y value of the view to draw to
* @param width the width of the view to draw to
* @param height the height of the view to draw to
* @param paint the paint used for drawing
* @param newColor if a new color is to be used
* @param color the color to be used
*/
protected void drawBackgroundAndFrame(DefaultRenderer renderer,IControl control,Direction.ccw);
// draw fill
BackgroundAndFill fill = renderer.getBackgroundAndFill();
if (fill != null)
{
paint.setStyle(Style.FILL);
BackgroundDrawer.drawPathBackground(canvas,control,paint);
paint.setAlpha(alpha);
}
// draw border
Line frame = renderer.getChartFrame();
if (frame != null)
{
paint.setStyle(Style.stroke);
paint.setstrokeWidth(2);
if(frame.isDash())
{
DashPathEffect dashPathEffect = new DashPathEffect(new float[] {5,paint);
paint.setStyle(Style.FILL);
paint.setAlpha(alpha);
}
paint.reset();
paint.setAntiAlias(true);
}
项目:iOffice
文件:WedgeCalloutDrawing.java
/**
* 线性标注1
* @param canvas
* @param shape
* @param rect
*/
private static Path getBorderCallout1Path(AutoShape shape,Rect rect)
{
float y1 = rect.top + rect.height() * 0.1875f;
float x1 = rect.left + rect.width() * (-0.08333f);
float y2 = rect.top + rect.height() * 1.125f;
float x2 = rect.left + rect.width() * (-0.38333f);
Float[] values = shape.getAdjustData();
if (values != null && values.length >= 4)
{
if (values[0] != null)
{
y1 = rect.top + rect.height() * values[0];
}
if (values[1] != null)
{
x1 = rect.left + rect.width() * values[1];
}
if (values[2] != null)
{
y2 = rect.top + rect.height() * values[2];
}
if (values[3] != null)
{
x2 = rect.left + rect.width() * values[3];
}
}
path.addRect(rect.left,rect.bottom,Path.Direction.CW);
path.moveto(x1,y1);
path.lineto(x2,y2);
return path;
}
项目:iOffice
文件:WedgeCalloutDrawing.java
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。