Skip to main content

TsgCADImage

Unit: CADImage

Description

The TsgCADImage class is a superstructure of TsgDXFConverter and at the same time is a descendant of TGraphic. This is the base class type for the AutoCAD® DXF, DWG, DWF, Hewlett-Packard® HPGL and HPGL2, SVG and CGM graphic file objects.

Syntax

TGraphic class

TsgCADImage = class(TGraphic)

Properties

PropertiesDescription
BackgroundColorThe property specifies the background color of the drawing which TsgCADImage displays.
BlocksThe property lists the blocks references of the drawing.
BorderSizeThe property specifies the size of the drawing’s border in global points or ratio.
BorderTypeThe property sets the type of drawing’s border.
CachingRasterModeThe property specifies the size of drawing’s border in global points or ratio.
CBFormatThe property displays predefined clipboard format.
ColorToLineWeightThe property specifies the line weight for entities by colors.
ConverterThe property contains information about the loaded CAD file.
CurrentLayoutThe property sets the current layout.
DefaultColorThe property sets the color for elements which have white color in AutoCAD™ DXF/DWG
DimensionsVisibleThe property switches on or off dimension of the drawing.
DrawingBoxThe property defines drawing box.
DrawMatrixThe property gets the matrix used for drawing.
DrawModeThe property specifies the current color mode.
EntitiesThe property lists all the entities of the CAD file.
ExtentsThe property defines drawing's extents.
FileNameThe property gets and sets the name of the file from which the image is loaded.
IsDraw3DAxesThe property gets and sets 3Daxes drawing mode.
IsDrawingRotatedThe property defines if the drawing is rotated.
IsLoadingThe property defines if the drawing is loading.
IsPlottingThe property defines the destination source status.
IsProcessMessagesThe property defines the messages processing mode.
IsShowBackgroundThe property can be used to show background.
IsShowLineWeightThe property can be used to draw all entities with NullWidth pixel lineweights.
IsWithoutBorderThe property can be used to draw the drawing without adding the empty space (borders).
LayoutsThe property gets the indexed layout.
LayoutsCountThe property gets the number of layouts.
LineWeightScaleThe property gets and sets the line weight scale.
MillimetersThe property can be used to change the drawing units (millimeters/inches)
NullWidthThe property specifies the default line weight of entities with zero lineweight.
OwnSourceThe property indicates if data is loaded.
PureExtentsThe property defines the exact image field in world coordinates, with no empty space added.
ResizeDisproportionateDrawingThe property points to layer, containing given primitive if this layer is given.
ScaleThe property returns scale factor of the image as TFPoint structure.
ShowImagesThe property gets and sets the raster image drawing mode.
StretchThe property indicates whether the CAD drawing should be changed so that it exactly fits the bounds of the image control.
TextVisibleThe property switches on or off texts of the CAD image.
TTFModeThe property specifies the mode of the TTF fonts reflection.
UseWinEllipseThe property can be used for drawing most of the arcs and circles in the image using GDI Windows functions such as Ellipse, Arc, etc., not linearized.
ViewRectangleFor CAD Import VCL internal uses only.

Methods

MethodsDescription
AbsHeightThe method returns the entire height of the CAD image.
AbsWidthThe method returns the entire width of the CAD image.
AddScaledDXFThe method adds a new drawing to the TsgCADImage object.
AddScaledDXFExThe method adds a new drawing to the TsgCADImage object.
AssignThe method copies a CAD image object and increase reference to the Converter object.
CommonToInternalUnitsThe method converts CAD coordinates of an image to the coordinates of the inner drawing's coordinate system.
CreateCreates and initializes a new TsgCADImage object.
DestroyDestroys an instance of the TsgCADImage class.
DrawRectThe method renders a part of a loaded drawing on a device context specified by DC.
ExportToMetafileThe method exports a CAD drawing to a Windows Enhanced metafile
GetCADCoordsThe method returns coordinates of a point on a drawing.
GetEntityColorThe method returns the entity's color.
GetExtentsThe method recalculates the drawing extents.
GetObjectSnapMaskThe method returns the object snap mode.
GetPointThe method converts point from the 3D coordinate system to the 2D coordinate system.
GetPointUCSThe method converts the UCS coordinates to the screen coordinates.
GetRealImagePointThe method the real coordinates of the point.
GetSnapDataThe method returns the data structure that contains the closest entity to the argument point, and the node point.
GetVisibleAreaThe method returns the visible area.
InternalToCommonUnitsThe method converts the coordinates of the inner drawing's coordinate system to the CAD coordinates of an image.
LoadFromClipboardFormatThe method loads from clipboard.
LoadFromFileThe method loads a CAD image from file.
LoadFromStreamThe method loads a CAD image from stream.
MeasurementThe method returns the information about measurement system for linear and angular measures.
RefreshCurrentLayoutThe method refreshes sizes of the current layout.
ResetDrawingBoxThe method switches off the drawing box.
RotateThe method rotates the current image.
RotDefaultThe method rotates the image to the default view.
RotToViewThe method rotates the image by parameter defined in A3DView.
SaveToClipboardFormatThe method saves to clipboard.
SaveToFileThe method saves the image to the file.
SaveToStreamThe method saves the image to the stream.
SetObjectSnapMaskThe method sets the object snap mode.
SetVisibleAreaThe method sets an area for snap.
StopLoadingThe method stops loading the file and displays only the loaded data.

Events

EventsDescription
OnAfterRotateThe event occurs after a CAD image being rotated.
OnBeforeRotateThe event occurs before a CAD image being rotated.
OnLayoutChangeThe event occurs when a current layout is being changed.