FreeBSD Manual Pages
center_image(3) Arcan Lua API center_image(3) NAME center_image - move a video object relative to an external reference object SYNOPSIS nil center_image( vid:src, vid:ref ) center_image( vid:src, vid:ref, int:anchor ) center_image( vid:src, vid:ref, int:anchor, int x_ofs ) center_image( vid:src, vid:ref, int:anchor, int x_ofs, y_ofs ) DESCRIPTION This positions the center of src relative to the center anchor point on ref . The anchor point can be changed by specifying the anchor ob- ject to one of: ANCHOR_UL : upper-left, ANCHOR_CR : upper-center, AN- CHOR_UR : upper-right, ANCHOR_CL : center-left, ANCHOR_C : center, ANCHOR_CR : center-right, ANCHOR_LL : lower-left, ANCHOR - LC : lower-center, ANCHOR_LR : lower-right. The final position can also be shifted by specifying x_ofs (px) and y_ofs . This is a one-time align- ment and resolves src and ref into world-space when calculating the final coordinates. For automatic response to changes in ref , use the link_image function. EXAMPLE function center_image0() local a = fill_surface(64, 32, 255, 0, 0); local b = fill_surface(127, 127, 0, 255, 0); show_image({a, b}); center_image(a, b); end SEE ALSO: link_image(3) image April 2025 center_image(3)
NAME | SYNOPSIS | DESCRIPTION | EXAMPLE | SEE ALSO:
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=center_image&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>