I am having a really odd problem that works for somethings but not
others. It feels more like a bug than a code problem to me.
I have tried may different approaches. However, I think the following
sums up the issue in it's simplest form. It does not represent the
code I want to use in my application. It is only to test this
problem.
If I use the following code and draw on my Canvas using a Paint
variable it works
TestPaint1 = new Paint();
TestPaint1.setAntiAlias(true);
TestPaint1.setTextSize(CurrentTextSize);
TestPaint1.setDither(true);
TestPaint1.setColor(CurrentColor);
TestPaint1.setStyle(Paint.Style.STROKE);
TestPaint1.setStrokeJoin(Paint.Join.ROUND);
TestPaint1.setStrokeCap(Paint.Cap.ROUND);
TestPaint1.setStrokeWidth(CurrentLineWidth);
I also use the above code to create TestPaint2 and TestPaint3
DrawingCanvas = getHolder().lockCanvas();
DrawingCanvas.drawLines
If I use the following code Canvas.drawCircle() and
Canvas.drawOval()work, but drawLine,drawRect, etc do NOT work.
public Paint CreatePaint(){
Paint TempPaint = new Paint();
TempPaint.setAntiAlias(true);
TempPaint.setTextSize(CurrentTextSize);
TempPaint.setDither(true);
TempPaint.setColor(CurrentColor);
TempPaint.setStyle(Paint.Style.STROKE);
TempPaint.setStrokeJoin(Paint.Join.ROUND);
TempPaint.setStrokeCap(Paint.Cap.ROUND);
TempPaint.setStrokeWidth(CurrentLineWidth);
return TempPaint;
}
Vector PaintVector
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en