this is the onDraw method for my View sub-class
drawCross() is a simple method that draws a cross.
shouldn't this code result in overlapping crosses.
trying to understand the translate method.
drawCross( canvas, 200, 400 ); // no transformations
Matrix m = new
Calling setMatrix() will override the existing transforms set on the
Canvas. The Canvas passed to View.onDraw() may already have transforms set
to draw in the correct location. Instead of using setMatrix(), using
Canvas.translate(), Canvas.scale(), etc. Don't forget to use Canvas.save()
and
2 matches
Mail list logo