LispWorks CAPI Reference Manual > 2 GP 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 get-origin values 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

LispWorks CAPI Reference Manual - 21 Dec 2009

NextPrevUpTopContentsIndex