; _______________________________________________________________________________________
;|                                                                                       |
;| ..::FreshLib::..  Free, open source. Licensed under "BSD 2-clause" license."          |
;|_______________________________________________________________________________________|
;
;  Description: Draw library contains procedures for drawing oprtations.
;
;  Target OS: Linux
;
;  Dependencies:
;
;  Notes:
;_________________________________________________________________________________________

lsEndCapRound = CapRound
lsEndCapSquare = CapButt
lsEndCapFlat   = CapProjecting

lsJoinRound = JoinRound shl 8
lsJoinBevel = JoinBevel shl 8
lsJoinMiter = JoinMiter shl 8



proc DrawLine, .context, .x1, .y1, .x2, .y2
begin
        push    eax ebx ecx edx

        mov     ebx, [.context]
        cinvoke XDrawLine, [hApplicationDisplay], [ebx+TContext.raster], [ebx+TContext.handle], [.x1], [.y1], [.x2], [.y2]
        pop     edx ecx ebx eax
        return
endp




macro Outline [type, x, y] {
  common
local ..types, ..points, ..count
     dd  ..count
     dd  ..types
     dd  ..points
  common
    label ..types byte
  forward
     db type
  common
    label ..points dword
  forward
    dd  x
    dd  y
}



;proc Draw, .context, .pDrawPoints
;begin
;
;        return
;endp

