On Fri, 25 Feb 2000, Nils �gren wrote:
> Hello list,
>
> I want to use WinDrawLine() but with a larger pen size, is that possible or
> do I have to use rectangles or something?
>
> Doesn't matter if it's throught the API:s or some third party libs.
>
> Any ideas?
>
> Thanks,
>
> Nils �gren
As far as I know, there isn't such thing in OS 3.0. The general procedure
I would use in such case is:
For given start & end points of line (x1,y1), (x2,y2) calculate coeffs.
a,b in
y=a*x+b
where this equation is (using start/end points)
y-y1=((y2-y1)/(x2-x1))*(x-x1) (beware of limit case x1=x2)
Now when you have a & b, you can determine step (in pixels) to divide
x-axis (this step should be as big as possible to preserve speed, but
enough small that picture looks nice), for given x calculate y and draw
point, rectangle, even image (your pattern) on (x,y).
If you want kind of 'freehand tool', you should keep track of pen (store
(x,y)s) and draw your pattern on these positions.
-DR
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html