;Assembler header file for Draw
;written by DefMod (Jan  2 2007) on Tue Jan  2 11:56:37 2007
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 21 Aug 1995

        [       :LNOT: :DEF: Draw_Hdr
        GBLS    Draw_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

;Symbols for constants
Draw_OSUnit                     *       256
Draw_Inch                       *       46080
Draw_Point                      *       640
Draw_EndPath                    *       &0
Draw_Continuation               *       &1
Draw_MoveTo                     *       &2
Draw_SpecialMoveTo              *       &3
Draw_CloseGap                   *       &4
Draw_CloseLine                  *       &5
Draw_BezierTo                   *       &6
Draw_GapTo                      *       &7
Draw_LineTo                     *       &8
Draw_FillNonzero                *       &0
Draw_FillNegative               *       &1
Draw_FillEvenOdd                *       &2
Draw_FillPositive               *       &3
Draw_FillWindingRuleShift       *       0
Draw_FillWindingRule            *       &3
Draw_FillFullExterior           *       &4
Draw_FillExteriorBoundary       *       &8
Draw_FillInteriorBoundary       *       &10
Draw_FillFullInterior           *       &20
Draw_FillOutputBBox             *       &2000000
Draw_Fill32BitClean             *       &4000000
Draw_FillCloseOpenSubpaths      *       &8000000
Draw_FillFlatten                *       &10000000
Draw_FillThicken                *       &20000000
Draw_FillReflatten              *       &40000000
Draw_FillFloat                  *       &80000000
Draw_JoinMitred                 *       &0
Draw_JoinRound                  *       &1
Draw_JoinBevelled               *       &2
Draw_CapButt                    *       &0
Draw_CapRound                   *       &1
Draw_CapSquare                  *       &2
Draw_CapTriangular              *       &3
Draw_SpecialInSitu              *       &0
Draw_SpecialFill                *       &1
Draw_SpecialFillBySubpaths      *       &2
Draw_SpecialCount               *       &3
Draw_SpecialBBox                *       &80000000
Error_DrawNoDrawInIRQMode       *       &980
Error_DrawBadDrawReasonCode     *       &981
Error_DrawReservedDrawBits      *       &982
Error_DrawInvalidDrawAddress    *       &983
Error_DrawBadPathElement        *       &984
Error_DrawBadPathSequence       *       &985
Error_DrawMayExpandPath         *       &986
Error_DrawPathFull              *       &987
Error_DrawPathNotFlat           *       &988
Error_DrawBadCapsOrJoins        *       &989
Error_DrawTransformOverflow     *       &98A
Error_DrawDrawNeedsGraphicsMode *       &98B
Error_DrawUnimplementedDraw     *       &9FF

;Symbols for structure offsets and sizes
                                ^       0
                                #       Byte
Draw_Tag                        *       @

                                ^       0
                                #       Bits
Draw_FillStyle                  *       @

                                ^       0
                                #       Byte
Draw_JoinStyle                  *       @

                                ^       0
                                #       Byte
Draw_CapStyle                   *       @

                                ^       0
                                #       Ptr
Draw_OutputPath                 *       @

                                ^       0
Draw_PathElement_tag            #       Draw_Tag
Draw_PathElement_reserved       #       3*Byte
Draw_PathElement_data           *       @
Draw_PathElement_data_end_path  #       Int
                                ^       Draw_PathElement_data
Draw_PathElement_data_continuation #       Ptr
                                ^       Draw_PathElement_data
Draw_PathElement_data_move_to   #       OS_Coord
                                ^       Draw_PathElement_data
Draw_PathElement_data_special_move_to #       OS_Coord
                                ^       Draw_PathElement_data
Draw_PathElement_data_bezier_to #       OS_Coord
                                ^       Draw_PathElement_data
Draw_PathElement_data_gap_to    #       OS_Coord
                                ^       Draw_PathElement_data
Draw_PathElement_data_line_to   #       OS_Coord
                                ^       Draw_PathElement_data
Draw_PathElement_data_reserved  #       24*Byte
Draw_PathElement                *       @

                                ^       0
Draw_LineStyle_join_style       #       Draw_JoinStyle
Draw_LineStyle_end_cap_style    #       Draw_CapStyle
Draw_LineStyle_start_cap_style  #       Draw_CapStyle
Draw_LineStyle_reserved         #       Byte
Draw_LineStyle_mitre_limit      #       Int
Draw_LineStyle_start_cap_width  #       Short
Draw_LineStyle_start_cap_length #       Short
Draw_LineStyle_end_cap_width    #       Short
Draw_LineStyle_end_cap_length   #       Short
Draw_LineStyle                  *       @

                                ^       0
Draw_DashPattern_start          #       Int
Draw_DashPattern_element_count  #       Int
Draw_DashPattern_elements       #       Int
Draw_DashPattern                *       @
        
        MACRO
$label                          Draw_DashPattern_MEMBERS
$label._start                   #       Int
$label._element_count           #       Int
        MEND
        
                                ^       0
Draw_DashPatternBase            Draw_DashPattern_MEMBERS
Draw_DashPatternBase            *       @

                                ^       0
Draw_Path_elements              #       Draw_PathElement
Draw_Path                       *       @

                                ^       0
Draw_ClipDescriptor_path        #       Ptr
Draw_ClipDescriptor_fill_style  #       Draw_FillStyle
Draw_ClipDescriptor_trfm        #       OS_Trfm
Draw_ClipDescriptor             *       @


;Symbols for SWI's and SWI reason codes
XDraw_ProcessPath               *       &60700
Draw_ProcessPath                *       &40700
   ;Entry
   ;  R0 -> path (Draw_Path)
   ;  R1 = fill_style (Draw_FillStyle)
   ;  R2 -> trfm (OS_Trfm)
   ;  R3 = flatness (Int)
   ;  R4 = thickness (Int)
   ;  R5 -> line_style (Draw_LineStyle)
   ;  R6 -> dash_pattern (Draw_DashPattern)
   ;  R7 = processed_path (Draw_OutputPath)
   ;Exit
   ;  R0 = end_or_used (pointer to data)

XDraw_Fill                      *       &60702
Draw_Fill                       *       &40702
   ;Entry
   ;  R0 -> path (Draw_Path)
   ;  R1 = fill_style (Draw_FillStyle)
   ;  R2 -> trfm (OS_Trfm)
   ;  R3 = flatness (Int)

XDraw_Stroke                    *       &60704
Draw_Stroke                     *       &40704
   ;Entry
   ;  R0 -> path (Draw_Path)
   ;  R1 = fill_style (Draw_FillStyle)
   ;  R2 -> trfm (OS_Trfm)
   ;  R3 = flatness (Int)
   ;  R4 = thickness (Int)
   ;  R5 -> line_style (Draw_LineStyle)
   ;  R6 -> dash_pattern (Draw_DashPattern)

XDraw_StrokePath                *       &60706
Draw_StrokePath                 *       &40706
   ;Entry
   ;  R0 -> path (Draw_Path)
   ;  R1 = stroked_path (pointer to Draw_Path)
   ;  R2 -> trfm (OS_Trfm)
   ;  R3 = flatness (Int)
   ;  R4 = thickness (Int)
   ;  R5 -> line_style (Draw_LineStyle)
   ;  R6 -> dash_pattern (Draw_DashPattern)
   ;Exit
   ;  R0 = end_or_used (pointer to data)

XDraw_FlattenPath               *       &60708
Draw_FlattenPath                *       &40708
   ;Entry
   ;  R0 -> path (Draw_Path)
   ;  R1 = flattened_path (pointer to Draw_Path)
   ;  R2 = flatness (Int)
   ;Exit
   ;  R0 = end_or_used (pointer to data)

XDraw_TransformPath             *       &6070A
Draw_TransformPath              *       &4070A
   ;Entry
   ;  R0 -> path (Draw_Path)
   ;  R1 = transformed_path (pointer to Draw_Path)
   ;  R2 -> trfm (OS_Trfm)
   ;  R3 = &0
   ;Exit
   ;  R0 = end_or_used (pointer to data)

XDraw_FillClipped               *       &6070C
Draw_FillClipped                *       &4070C
   ;Entry
   ;  R0 -> path (Draw_Path)
   ;  R1 = fill_style (Draw_FillStyle)
   ;  R2 -> trfm (OS_Trfm)
   ;  R3 = flatness (Int)
   ;  R4 -> clip_descriptor (Draw_ClipDescriptor)

XDraw_StrokeClipped             *       &6070E
Draw_StrokeClipped              *       &4070E
   ;Entry
   ;  R0 -> path (Draw_Path)
   ;  R1 = fill_style (Draw_FillStyle)
   ;  R2 -> trfm (OS_Trfm)
   ;  R3 = flatness (Int)
   ;  R4 = thickness (Int)
   ;  R5 -> line_style (Draw_LineStyle)
   ;  R6 -> dash_pattern (Draw_DashPattern)
   ;  R7 -> clip_descriptor (Draw_ClipDescriptor)

DrawV                           *       &20

        ]
        END
