android - Cannot draw on surfaceview onDraw -


hi using surfaceview draw on canvas.when using this

canvas.drawcircle(100, 100, 5, paint); //it drawing fine 

while using :

canvas.drawcircle(x, y, 5, paint); //it's not drawing.x,y being points on screen , floats. 

any help

check if x , y coordinate positive , inside bounds of view:

x >= 0 && x < canvas.getwidth() && y >= 0 && y < canvas.getheight() 

Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -