Android Question ghost remainer when drawing and clearing a line on a canvas with android 12

MbedAndroid

Active Member
Licensed User
Longtime User
seems that android 12 interpolates? pixels besides a drawn line. At least suddenly i got somehow a ghost remainer line, when clearing a previous written line on a canvas.
solution i made is simple:
drawing a line for example with thickness 3
B4X:
cvsGraph.DrawLine(Var.CenterX,0,Var.CenterX,20dip,VectorColor,3)
(then x,y positions are saved thus next frame on the same start/end positions as previous written the vector, the vector is ereased with the default canvas color)
then clearing that same line with thickness 5
B4X:
cvsGraph.DrawLine(Var.CenterX,Var.CenterY,Var.OldPosX,Var.OldPosY,PnlPlotColor,5) '' old vector

for me it looks like android interpolates the pixels besides the vector with a lower alpha.

this is my solution so far, may be someone has a better idea.
sorry i dont have a screenshot of this effect.
 

kimstudio

Active Member
Licensed User
Longtime User
In old non-antialiasing times pixel xor technique is used to accelerate drawing speed, nowadays we just redraw whole screen as computer speed is not a problem anymore...

If certain drawing actions need to be maintained then we record these actions in a list and selectively redraw them.
 
Upvote 0

MbedAndroid

Active Member
Licensed User
Longtime User
In old non-antialiasing times pixel xor technique is used to accelerate drawing speed, nowadays we just redraw whole screen as computer speed is not a problem anymore...

If certain drawing actions need to be maintained then we record these actions in a list and selectively redraw them.
possible, but not needed this case.

I didn't realize that the Samsung tablet has antialiasing possibility, as with android 11 this was not the case with this particular Samsung tablet. Anyway, with Cvs Antialiasing=off this issue is gone.
 
Upvote 0
Top