Next: , Previous: , Up: Core object functions   [Contents][Index]


2.2.9 Pictures

A picture object displays an image in the schematic, and is a purely graphical element. Pictures may be in any format supported by the user’s GdkPixbuf installation (but note that images that can’t be loaded for some reason are preserved). The top-left, bottom-right, angle and mirror properties of a picture object indicate the transformation that was applied to the original image. The transformation is applied as follows:

  1. If mirror is true, the picture is reflected about its vertical centerline.
  2. The picture is rotated by angle anticlockwise about its center (angle may only be an integer multiple of 90 degrees).
  3. The picture is scaled and translated to fit within the rectangle defined by the points top-left and bottom-right.
Function: picture? object

Returns ‘#t’ if and only if object is a picture object.

Function: make-picture/vector vector filename top-left bottom-right angle mirror

Creates and returns a new picture object for filename, by reading image data from vector (which should be in a standard image file format). If vector could not be loaded, an error is raised. top-left, bottom-right, angle and mirror specify the picture transformation.

The points top-left and bottom-right should be specified in the form ‘(x . y)’.

Function: set-picture! picture top-left bottom-right angle mirror

Sets the picture transformation for picture.

Function: picture-info picture

Returns the parameters of picture as a list in the form:

(filename (top-left-x . top-left-y) (bottom-right-x . bottom-right-y) angle mirror)
Function: picture-filename picture

Returns the filename associated with picture as a string.

Function: picture-top-left picture

Returns the position of the top left corner of ‘picture’ in the form ‘(x . y)’.

Function: picture-bottom-right picture

Returns the position of the bottom right corner of ‘picture’ in the form ‘(x . y)’.

Function: picture-angle picture

Returns the angle to rotate ‘picture’ by, as an integer number of degrees.

Function: picture-mirror? picture

Returns true if ‘picture’ is mirrored.


Next: Text, Previous: Paths, Up: Core object functions   [Contents][Index]