Image reference Home

An image reference object is used to display preliminary loaded raster image. It will be fit into a drawing coordinate space, so the visible size will be changed accordingly to the drawing's view scale.

To add an image reference into a drawing use following functions:

Function Meaning
lcBlockAddImageRef Adds a raster image reference
lcBlockAddImageRefUns Adds a raster image reference (unscalable)
lcBlockAddImagePlace Adds "drawn-by-client" raster image to a drawing

Image reference specific functions:

Function Meaning
lcImgRefGetPixel Retrieves drawing coordinates and color for pixels of image reference
lcImgRefResize Changes the pixel dimensions of an image reference

An image reference has properties and functions derived from base class and the following specific properties:

Property Type Access Meaning
LC_PROP_ENT_...    Base class properties
LC_PROP_IMGREF_IMAGE handle
string
RW Handle to Image
Name of Image
LC_PROP_IMGREF_XC float RW X coordinate of center point
LC_PROP_IMGREF_YC float RW Y coordinate of center point
LC_PROP_IMGREF_W float RW Width
LC_PROP_IMGREF_H float RW Height
LC_PROP_IMGREF_WPIX int R Image width in pixels
LC_PROP_IMGREF_HPIX int R Image height in pixels
LC_PROP_IMGREF_SCALE
LC_PROP_IMGREF_PIXELSIZE
float RW Image scale, units per pixel. Setting this parameter will set LC_PROP_IMGREF_SQPIX property to TRUE
LC_PROP_IMGREF_SCALEX float RW Image scale along X dimension, units per pixel
LC_PROP_IMGREF_SCALEY float RW Image scale along Y dimension, units per pixel
LC_PROP_IMGREF_SQPIX bool RW Flag "Square pixel". Means uniform image scale along X,Y. If TRUE then changing one dimension/scale will change other.
LC_PROP_IMGREF_ANGLE float RW Rotation angle, around left-bottom corner
LC_PROP_IMGREF_BORDER bool RW "Draw a border" flag
LC_PROP_IMGREF_TRANSP int RW Transparency: 0-none, 1-TransColor, 2-AlphaValue
LC_PROP_IMGREF_TRCOLOR int RW Transparent color (COLORREF)
LC_PROP_IMGREF_TRALPHA int RW Transparency alpha value (0-255)
LC_PROP_IMGREF_GRAYS bool RW Grayscale mode
LC_PROP_IMGREF_FLIPHOR bool RW Flip horizontally
LC_PROP_IMGREF_FLIPVER bool RW Flip vertically
LC_PROP_IMGREF_PATH string R Iimage full filename
LC_PROP_IMGREF_GP_X float R result of lcImgRefGetPixel
LC_PROP_IMGREF_GP_Y float R result of lcImgRefGetPixel
LC_PROP_IMGREF_GP_COLOR int R result of lcImgRefGetPixel
LC_PROP_IMGREF_GP_GRAY bool RW color mode for lcImgRefGetPixel
LC_PROP_IMGREF_UNSCALABLE bool RW "Unscalable image" flag
LC_PROP_IMGREF_UNSSCALE float RW Scale for unscalable image
LC_PROP_IMGREF_UNSALIGN float RW Alignment for unscalable image (relative to LC_PROP_IMGREF_XC, LC_PROP_IMGREF_YC)
Can one of the following values:
LC_IMGA_CENTER - Center point (default)
LC_IMGA_LEFBOT - Left Bottom corner
LC_IMGA_RIGBOT - Right Bottom corner
LC_IMGA_LEFTOP - Left Top corner
LC_IMGA_RIGTOP - Right Top corner

See also

  Retrieve objects