Welcome! Log In Create A New Profile

Advanced

WM24/25 - draw a dotted/dashed line not working (Android)

Posted by ArieM 
WM24/25 - draw a dotted/dashed line not working (Android)
December 11, 2020 07:56PM
Hi,

in one of my apps I added some functionality to add annotations to a photo, like a simple text and lines.

Drawing a solid line works fine and according to the help I also can specify several dash/dot linestyles using dPen() with line style =1 for example (dashed line). But the result is still a solid line.

Can anyone confirm this is a bug or am I missing something here?

Arie
Re: WM24/25 - solved -draw a dotted/dashed line not working (Android)
December 11, 2020 09:08PM
As usual, when explaining a problem you really start thinking.
Not a bug but my mistake

When setting the color, tickness and style with dPen(), one must used the dLine() syntax without the color option.
dLine(x1,y1,x2,y2) and not dLine(x1,y1.x2.xy,color,thickness).
Makes sense...

Arie
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: