DrawBox
Synopsis
DrawBox(rp, left, top, width, height)
A1 D0 D1 D2 D3C Prototype
void DrawBox(struct RastPort *rp, LONG left, LONG top, LONG width, LONG height);Description
Draws a rectangle outline on a RastPort in an extremely fast manner. Particularly useful for C programmers.
Inputs
- rp — Address of a RastPort structure.
- left — X coordinate of the upper-left corner.
- top — Y coordinate of the upper-left corner.
- width — Width of the rectangle.
- height — Height of the rectangle.
Result
None.
See Also
graphics.library/Draw()
Implementation
The original 68020 assembly implementation:
; (15-11-1994) --- DrawBox(rp, left, top, width, height) (a1,d0,d1,d2,d3)
_LVODrawBox
movem.l d2-d5/a2/a6,-(sp)
move.l ab_GfxBase(a6),a6
move.w d0,d4
move.w d1,d5
move.l a1,a2
AMOVE a1
move.w d4,d0
move.w d5,d1
add.w d2,d0
jsr _LVODraw(a6)
move.w d4,d0
move.w d5,d1
add.w d2,d0
add.w d3,d1
move.l a2,a1
jsr _LVODraw(a6)
move.w d4,d0
move.w d5,d1
add.w d3,d1
move.l a2,a1
jsr _LVODraw(a6)
move.w d4,d0
move.w d5,d1
move.l a2,a1
jsr _LVODraw(a6)
movem.l (sp)+,d2-d5/a2/a6
rtsLast updated on