Xbasic
SET_ORIGIN Function
Syntax
V SET_ORIGIN(N XPos,N YPos)
Arguments
- XPos
The horizontal coordinate of the new origin.
- YPos
The horizontal coordinate of the new origin.
Description
Set origin of coordinates.
Discussion
The SET_ORIGIN() function sets the 0,0 point on the bitmap. By default, the origin is at the upper left corner of the bitmap. Larger values move the origin right and down.
ui_bitmap_create("test", 4, 2)
ui_bitmap_draw("test",<<%code%
inner_Rect(0, 0, 4, 2)
set_pen("black", "Solid", 1)
set_origin(2, 1)
set_brush("green")
start_poly(0, -.75)
lineto(1, .25)
lineto(-1, .25)
fill_poly(0, -.75)
set_rotate(30)
set_brush("blue")
start_poly(0, -.75)
lineto(1, .25)
lineto(-1, .25)
fill_poly(0, -.75)
%code%)
ui_dlg_box("","{image=test}")Limitations
Used only in the Code sections of UI_BITMAP_DRAW(), UI_SCREEN_DRAW(), and UI_PRINTER_DRAW().
See Also
