Lines drawn with the drawing API spread their thickness from the center.
(unless I there's a way to set their orientation that I dont know of)

You have to obviously compensate for the that...
drawRect(1.5,1.5,canvas.width-1.5,canvas.height-1.5);

-- Keith H --
www.keith-hair.net





Tracy Spratt wrote:
>  
>
> I am using the Graphics class to draw borders on a Canvas.  I think I 
> do not understand how the positioning works. 
>
>  
>
> For example, I set lineStyle to width of 3 and some color, then I use 
> drawRect and specify x=0, y=0, width  = canvas.width and height = 
> canvas.height.
>
>  
>
> I am expecting a 3 pixel border within the canvas.
>
>  
>
> But that is not what I see.  Instead, all of the drawn lines are 
> partially clipped by the canvas.
>
>  
>
> With drawRect, what is the relation between the x,y, width, height, 
> and the line width?
>
>  
>
> I am trying to figure this out by trial and error, but have not been 
> able to infer the rules.
>
>  
>
> Tracy Spratt,
>
> Lariat Services, development services available
>
>  
>
> 


Reply via email to