public class DwgImage extends CadImage
Dwg image class
| Constructor and Description |
|---|
DwgImage() |
DwgImage(CadAcadVersion cadVersion)
Initializes a new instance of the
DwgImage class. |
| Modifier and Type | Method and Description |
|---|---|
void |
addBlock(String blockName) |
void |
addBlock(String blockName,
String layerName)
Adds a new block to the drawing.
|
void |
addEntity(CadEntityBase entity)
Add entity to drawing
|
void |
addEntityToBlock(String blockName,
CadEntityBase entity)
Adds an entity to the specified block.
|
CadLayerTable |
addLayer(String layerName)
Add layer to drawing
|
void |
addOle2Frame(byte[] imageData) |
void |
addOle2Frame(byte[] imageData,
Cad3DPoint insertPoint) |
void |
addOle2Frame(byte[] imageData,
Cad3DPoint insertPoint,
Double width) |
void |
addOle2Frame(byte[] imageData,
Cad3DPoint insertPoint,
Double width,
Double height) |
void |
addOle2Frame(byte[] imageData,
Cad3DPoint insertPoint,
Double width,
Double height,
boolean lockAspectRatio)
Adds an OLE2FRAME entity to the drawing using BMP image data.
|
void |
insertBlock(String blockName,
Cad3DPoint... insertPoints)
Inserts a block into the drawing at the specified points.
|
addCustomProperty, cacheData, changeCustomProperty, fillBounds, getActivePage, getAppIdTables, getApplicationVersion, getBlockEntities, getBlocksTables, getBounds, getCadAcds, getClassEntities, getCustomProperties, getDefaultFont, getDefaultLineWeight, getDepth, getDimensionStyles, getEntities, getFileEncoding, getHeader, getHeight, getLayers, getLayouts, getLineTypes, getMaintenanceVersion, getMaxPoint, getMinPoint, getObjects, getSpecifiedEncoding, getSpecifiedMifEncoding, getStrings, getStyles, getThumbnailImage, getUCSs, getViewPorts, getViews, getWidth, isCached, removeCustomProperty, setAppIdTables, setApplicationVersion, setBlockEntities, setBlocksTables, setCadAcds, setClassEntities, setDefaultFont, setDefaultLineWeight, setDimensionStyles, setEntities, setFileEncoding, setHeader, setLayers, setLineTypes, setMaintenanceVersion, setObjects, setSpecifiedEncoding, setSpecifiedMifEncoding, setStyles, setThumbnailImage, setUCSs, setViewPorts, setViews, tryRemoveEntity, updateSize, updateSizecanLoad, canLoad, canLoad, canLoad, canSave, getAnnotationService, getBounds, getContainer, getFileFormat, getFileFormat, getPalette, getSize, getUnitlessDefaultUnitType, getUnitType, getWatermarkGuardService, load, load, load, load, load, save, save, save, setPalettegetDataStreamContainer, save, save, save, saveclose, dispose, getDisposedpublic DwgImage()
public DwgImage(CadAcadVersion cadVersion)
Initializes a new instance of the DwgImage class.
public final void addEntity(CadEntityBase entity)
Add entity to drawing
entity - public final CadLayerTable addLayer(String layerName)
Add layer to drawing
layerName - The layer namepublic final void addBlock(String blockName)
public final void addBlock(String blockName, String layerName)
Adds a new block to the drawing.
blockName - The name of the block.layerName - The layer name.com.aspose.ms.System.ArgumentException - Thrown if the block name is invalid or already exists.public final void addEntityToBlock(String blockName, CadEntityBase entity)
Adds an entity to the specified block.
blockName - The name of the block.entity - The entity to add.com.aspose.ms.System.ArgumentNullException - Thrown if entity is null.com.aspose.ms.System.ArgumentException - Thrown if the block does not exist, is a system block, or the entity is already associated with another block.public final void insertBlock(String blockName, Cad3DPoint... insertPoints)
Inserts a block into the drawing at the specified points.
blockName - The name of the block to insert.insertPoints - The insertion points for the block.com.aspose.ms.System.ArgumentException - Thrown if the block does not exist, is a system blockpublic final void addOle2Frame(byte[] imageData)
public final void addOle2Frame(byte[] imageData,
Cad3DPoint insertPoint)
public final void addOle2Frame(byte[] imageData,
Cad3DPoint insertPoint,
Double width)
public final void addOle2Frame(byte[] imageData,
Cad3DPoint insertPoint,
Double width,
Double height)
public final void addOle2Frame(byte[] imageData,
Cad3DPoint insertPoint,
Double width,
Double height,
boolean lockAspectRatio)
Adds an OLE2FRAME entity to the drawing using BMP image data.
imageData - Byte array containing 24-bit BMP image data.insertPoint - Insertion point of the OLE2FRAME entity.width - Width of the OLE2FRAME.height - Height of the OLE2FRAME.lockAspectRatio - If true, maintains the image aspect ratio by adjusting height based on width or vice versa.Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.