Graph

Overview

Graph is a class in Aspose.PDF FOSS for .NET. Inherits from: BaseParagraph.

A graph container that holds drawable shapes and renders them to a content stream.

This class provides 7 methods for working with Graph objects in .NET programs. Available methods include: Add, Build, Clone, Graph. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: Border, GraphInfo, Height, HorizontalAlignment, Hyperlink, HyperlinkText, and 13 more.

Properties

NameTypeAccessDescription
WidthdoubleRead/WriteGets or sets the width.
HeightdoubleRead/WriteGets or sets the height.
IsChangePositionboolRead/WriteWhen false the graph is placed at an absolute position (Left, Top) and does not participate in the document flow.
LeftdoubleRead/WriteAbsolute horizontal position from the left page edge (used when IsChangePosition is false).
TopdoubleRead/WriteAbsolute vertical position from the top page edge (used when IsChangePosition is false).
BorderBorderInfo?Read/WriteOptional border around the graph area.
GraphInfoAspose.Pdf.GraphInfoRead/WriteDefault stroke/fill settings inherited by shapes added to this graph.
ZIndexintRead/WriteZ-index for layering; higher draws on top.
TitleAspose.Pdf.Text.TextFragment?Read/WriteOptional title rendered above the graph.
ShapesBoundsCheckableList<Shape>Read/WriteThe list of shapes inside this graph.
HorizontalAlignmentHorizontalAlignmentRead/WriteHorizontal alignment applied to this paragraph.
VerticalAlignmentVerticalAlignmentRead/WriteVertical alignment applied to this paragraph.
MarginMarginInfo?Read/WriteOuter-margin info applied to this paragraph.
IsFirstParagraphInColumnboolRead/WriteForce the paragraph to start a new column.
IsKeptWithNextboolRead/WriteKeep this paragraph on the same page as the next one.
IsInNewPageboolRead/WriteForce the paragraph to start on a new page.
IsInLineParagraphboolRead/WriteInline paragraph flag (does not start a new line).
HyperlinkTextstring?Read/WriteLegacy string-typed hyperlink target.
HyperlinkHyperlink?Read/WriteTyped hyperlink decoration applied to the paragraph.

Methods

SignatureDescription
Graph(width: double, height: double)Calls Graph on this Graph instance.
Graph(width: float, height: float)Single-precision overload.
Add(shape: Shape)Calls Add on this Graph instance.
Clone()Shallow clone — shapes are shared by reference.
Build()Render all shapes to a content stream.
Build(page: Page?)Render all shapes to a content stream, registering ExtGState resources on the page if needed.
Build(page: Page?, offsetX: double, offsetY: double)Render all shapes to a content stream translated so the graph’s local origin (bottom-left corner) lands at (offsetX, offsetY) in page coordinates.

See Also