Class ImageDataProperties
This class specifies optional properties passed to MakeImageData(ImageDataProperties).
Namespace: Northwoods.Go
Assembly: Northwoods.GoDiagram.WinForms.dll
Syntax
public class ImageDataProperties
Properties
Background
A valid color to replace the default (transparent) background.
Declaration
public string Background { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
Any padding area is also colored.
MaxSize
The maximum size of the created image, as a Size.
Declaration
public Size? MaxSize { get; set; }
Property Value
Type | Description |
---|---|
Size? |
Remarks
The default value is (2000, 2000)
for images.
This is typically used when Scale is specified and helps prevent accidental excessive memory usage,
which is especially needed in limited-memory environments.
You cannot use Infinity when providing a maximum size for an image.
Padding
A Margin (or number) to pad the image with.
Declaration
public Margin Padding { get; set; }
Property Value
Type | Description |
---|---|
Margin |
Remarks
If a size is specified, the padding will not increase the image size, it will only offset the Diagram contents within the image.
The default value is a padding of 1
.
Parts
Declaration
public IEnumerable<Part> Parts { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<Part> |
Remarks
If GraphObjects are specified their containing Part will be drawn. By default all Parts are drawn except temporary parts (see ShowTemporary).
Position
The position of the diagram, as a Point.
Declaration
public Point? Position { get; set; }
Property Value
Type | Description |
---|---|
Point? |
Remarks
By default this is the position of DocumentBounds with the Padding removed. If a specific parts collection is used, by default this is the top-left diagram position of their collective bounds. If you set a position, you should also set a Size.
Scale
The scale of the diagram.
Declaration
public double? Scale { get; set; }
Property Value
Type | Description |
---|---|
double? |
Remarks
If Scale is specified and Size is not, the resulting image will be sized to uniformly
fit the space needed for the given scale.
Can be constrained by the MaxSize property. A scale value of NaN
will
automatically scale to fit within the MaxSize, but may be smaller, with a maximum computed scale of 1.
ShowGrid
A boolean value, defaulting to the value of ShowTemporary, that determines whether or not the Grid Layer (containing Grid) is included in the image regardless of the value of ShowTemporary.
Declaration
public bool? ShowGrid { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Remarks
This is useful if you want to include the grid but not adornments, or vice versa.
ShowTemporary
A boolean value, defaulting to false, that determines whether or not temporary objects such as adornments are included in the image.
Declaration
public bool ShowTemporary { get; set; }
Property Value
Type | Description |
---|---|
bool |
Size
Declaration
public Size? Size { get; set; }
Property Value
Type | Description |
---|---|
Size? |