FreeBSD Manual Pages
image_origo_offset(3) Arcan Lua API image_origo_offset(3) NAME image_origo_offset - Shift the current object rotation and anchoring offset SYNOPSIS nil image_origo_offset( vid:dst, number:xofs, number:yofs ) image_origo_offset( vid:dst, number:xofs, number:yofs, number:zofs=0.0 ) image_origo_offset( vid:dst, number:xofs, number:yofs, number:zofs=0.0 ) image_origo_offset( vid:dst, number:xofs, number:yofs, number:zofs=0.0, int:anchor ) DESCRIPTION By default, the rotation origo for each object is set to its local cen- ter (0.5*w, 0.5*h). This function can be used to add an offset value to that. For anchoring, the valid anchor values are: ANCHOR_UL : upper-left, ANCHOR_CR : upper-center, ANCHOR_UR : upper-right, ANCHOR_CL : cen- ter-left, ANCHOR_C : center, ANCHOR_CR : center-right, ANCHOR_LL : lower-left, ANCHOR_LC : lower-center, ANCHOR_LR : lower-right. NOTES 1 Rotation offset is relative to the local object itself. For com- plex object hierarchies, the bounding volume would have to be calculated and each object shifted in turn. EXAMPLE function image_origo_offset0() a = fill_surface(32, 32, 255, 0, 0); b = fill_surface(32, 32, 0, 255, 0); show_image({a, b}); move_image(a, 50, 100); move_image(b, 100, 100); rotate_image(a, 45); rotate_image(b, 45); image_origo_offset(b, -10, -10); end EXAMPLE function image_origo_offset1() a = fill_surface(128, 128, 255, 0, 0) b = fill_surface(32, 32, 0, 255, 0); show_image({a, b}) link_image(a, b, ANCHOR_LR) image_origo_offset(a, 0, 0, 0, ANCHOR_C) end image March 2026 image_origo_offset(3)
NAME | SYNOPSIS | DESCRIPTION | NOTES | EXAMPLE | EXAMPLE
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=image_origo_offset&sektion=3&manpath=FreeBSD+Ports+15.0.quarterly>
