Android Question drawing question #2

DPaul

Active Member
Licensed User
Longtime User
Hi ,

Imagine this is my code :
cvsGraph.DrawLine(230dip, 299dip, 200dip, 1dip, Colors.white, 2dip)
But i want to make the "2dip" variable in function of something else.

I suppose that i have to concatenate this as a string myself,
such as :
dim t as string = thicknessCounter & "dip"
cvsGraph.DrawLine(230dip, 299dip, 200dip, 1dip, Colors.white, t)

Is this state of the art?

thx,
Paul
 

klaus

Expert
Licensed User
Longtime User
Is this state of the art?
No it is wrong.
StrokeWidth expects a Float not a String.
You could simply use:
cvsGraph.DrawLine(230dip, 299dip, 200dip, 1dip, Colors.White, thicknessCounter * 1dip)
 
Upvote 0

DPaul

Active Member
Licensed User
Longtime User
Must be the fastest help forum in ICT history.
The right answer inside 5 minutes !
Thanks
Paul
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…