All Manuals > CAPI User Guide and Reference Manual > 22 GRAPHICS-PORTS Reference Entries

NextPrevUpTopContentsIndex

get-origin

Function
Summary

Returns the coordinate origin of a pixmap graphics port.

Package

graphics-ports

Signature

get-origin pixmap-port => x , y

Arguments

pixmap-port

A graphics port.

Values

x

An integer.

y

An integer.

Description

This returns two values being the coordinate origin of the pixmap graphics port. Normally this is (0 0) but after a series of drawing function calls with :relative t, the drawing may have been shifted. The values returned by get-origin tell you by how much. The values are not needed when making images from the port's drawing.

Example
(with-pixmap-graphics-port (p1 pane width height :relative t)
    (with-graphics-rotation (p1 0.123)
      (draw-rectangle p1 0 0 200 120 :filled t
                                       :foreground :red)
      (get-origin p1)))   

produces:

-15
0

CAPI User Guide and Reference Manual (Unix version) - 3 Aug 2017

NextPrevUpTopContentsIndex