Class PictureShape
Represents the picture shape used by the presentation model.
Implements
Inherited Members
Namespace: DRIT.Presentation.Drawing
Assembly: DRIT.Presentation.dll
Syntax
public class PictureShape : AbstractShape, IDrawingObject
Constructors
PictureShape()
Initializes a new instance of the picture shape class.
Declaration
public PictureShape()
Properties
Description
Gets or sets the description of the picture.
Declaration
public string Description { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Formula
Gets or sets the formula text.
Declaration
public string Formula { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
LockAspectRatio
Gets or sets whether the picture retains its original proportions when you resize it.
Declaration
public bool LockAspectRatio { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Picture
Gets or sets the picture associated with this object.
Declaration
public Picture Picture { get; }
Property Value
| Type | Description |
|---|---|
| Picture |
Title
Gets or sets the title of the picture.
Declaration
public string Title { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
SaveImage(string, ImageFormat, int)
Saves the embedded picture to a file in the specified image format.
Declaration
public void SaveImage(string path, ImageFormat format, int quality = 100)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | The output image path. |
| ImageFormat | format | The output image format. |
| int | quality | The JPEG quality from 0 to 100. |
SetImage(string)
Sets the picture content from an image file and registers the bytes with the owning presentation's media cache.
Declaration
public override AbstractShape SetImage(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path |
Returns
| Type | Description |
|---|---|
| AbstractShape |
Overrides
SetSvgImage(string)
Sets the picture content from SVG markup and registers it with the owning presentation's media cache.
Declaration
public PictureShape SetSvgImage(string svgContent)
Parameters
| Type | Name | Description |
|---|---|---|
| string | svgContent | The SVG document markup. |
Returns
| Type | Description |
|---|---|
| PictureShape |
SetSvgImage(string, string)
Sets the picture content from SVG markup, resolving local external image
references relative to baseDirectory before embedding it.
Declaration
public PictureShape SetSvgImage(string svgContent, string baseDirectory)
Parameters
| Type | Name | Description |
|---|---|---|
| string | svgContent | The SVG document markup. |
| string | baseDirectory | The directory used to resolve relative resource paths. |
Returns
| Type | Description |
|---|---|
| PictureShape |