;Assembler header file for Draw
;written by DefMod (Mar  9 1999) on Thu Apr  8 04:02:14 1999
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 21 Aug 1995

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

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

        [       :LNOT: :DEF: Draw_Hdr
        GBLS    Draw_Hdr

;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_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
Draw_Tag                        *       Byte

Draw_FillStyle                  *       Bits

Draw_JoinStyle                  *       Byte

Draw_CapStyle                   *       Byte

Draw_OutputPath                 *       Ptr

                                ^       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                *       @

                                ^       0
Draw_Path_elements              #       Draw_PathElement
Draw_Path                       *       @


;Symbols for SWIs 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)

DrawV                           *       &20

        ]

        END
