API Reference
ImageComposition
Dependency-free RGBA image composition surface for wallpapers, previews, reports, and reusable renderer hosts.
Inheritance
- Object
- ImageComposition
Usage
Explore 33 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 31
- Method ImageComposition.Clear
- Method ImageComposition.Create
- Method ImageComposition.CreateTransparent
- Method ImageComposition.DrawArc
- Method ImageComposition.DrawCallout
- Method ImageComposition.DrawChart
- Method ImageComposition.DrawChartGrid
- Method ImageComposition.DrawDashedLine
- Method ImageComposition.DrawImage
- Method ImageComposition.DrawImageBytes
- Method ImageComposition.DrawImageFile
- Method ImageComposition.DrawLine
- Method ImageComposition.DrawProgressRing
- Method ImageComposition.DrawText
- Method ImageComposition.DrawTopology
- Method ImageComposition.DrawVisualBlock
- Method ImageComposition.DrawVisualCanvas
- Method ImageComposition.DrawVisualGrid
- Method ImageComposition.FillCircle
- Method ImageComposition.FillEllipse
- Method ImageComposition.FillRectangle
- Method ImageComposition.FillRectangleLinearGradient
- Method ImageComposition.FillRectangleRadialGradient
- Method ImageComposition.FillRoundedRectangle
- Method ImageComposition.FromBytes
- Method ImageComposition.FromFile
- Method ImageComposition.FromImage
- Method ImageComposition.StrokeCircle
- Method ImageComposition.StrokeEllipse
- Method ImageComposition.StrokeRectangle
- Method ImageComposition.StrokeRoundedRectangle
Accepted by parameters 2
- Method ImageComposition.TryFromBytes
- Method ImageComposition.TryFromFile
Methods
public ImageComposition Clear(ChartColor color) #ImageCompositionFills the whole composition with a color.
Parameters
- color ChartForgeX.Primitives.ChartColor
public static ImageComposition Create(Int32 width, Int32 height, ChartColor background) #ImageCompositionCreates a new composition with the requested background.
Parameters
- width System.Int32
- height System.Int32
- background ChartForgeX.Primitives.ChartColor
public static ImageComposition CreateTransparent(Int32 width, Int32 height) #ImageCompositionCreates a transparent composition.
Parameters
- width System.Int32
- height System.Int32
public ImageComposition DrawArc(Double centerX, Double centerY, Double radius, Double startAngle, Double sweepAngle, ChartColor color, Double thickness = 1, ImageLineCap lineCap = Round) #ImageCompositionDraws an antialiased circular arc. Angles are in degrees, measured clockwise on screen from the positive x axis (three o'clock), so -90 starts at twelve o'clock. A positive sweep runs clockwise; a sweep of 360 degrees or more draws the whole ring.
Parameters
- centerX System.Double
- centerY System.Double
- radius System.Double
- startAngle System.Double
- sweepAngle System.Double
- color ChartForgeX.Primitives.ChartColor
- thickness System.Double = 1
- lineCap ChartForgeX.Composition.ImageLineCap = Round
public ImageComposition DrawCallout(Double anchorX, Double anchorY, Double boxX, Double boxY, Double boxWidth, Double boxHeight, String text, Double fontSize, ChartColor lineColor, ChartColor fillColor, ChartColor textColor, Double radius = 4, Double thickness = 1, Double padding = 4) #ImageCompositionDraws a leader line and rounded text box callout for reusable image annotations.
Parameters
- anchorX System.Double
- anchorY System.Double
- boxX System.Double
- boxY System.Double
- boxWidth System.Double
- boxHeight System.Double
- text System.String
- fontSize System.Double
- lineColor ChartForgeX.Primitives.ChartColor
- fillColor ChartForgeX.Primitives.ChartColor
- textColor ChartForgeX.Primitives.ChartColor
- radius System.Double = 4
- thickness System.Double = 1
- padding System.Double = 4
public ImageComposition DrawChart(Chart chart, Double x, Double y, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1) #ImageCompositionDraws a chart layer.
Parameters
- chart ChartForgeX.Core.Chart
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
public ImageComposition DrawChart(Chart chart, VisualCanvasPlacement placement, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1) #ImageCompositionDraws a chart layer using anchor-based placement.
Parameters
- chart ChartForgeX.Core.Chart
- placement ChartForgeX.Composition.VisualCanvasPlacement
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
public ImageComposition DrawChartGrid(ChartGrid grid, Double x, Double y, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1) #ImageCompositionDraws a chart grid layer.
Parameters
- grid ChartForgeX.Core.ChartGrid
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
public ImageComposition DrawChartGrid(ChartGrid grid, VisualCanvasPlacement placement, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1) #ImageCompositionDraws a chart grid layer using anchor-based placement.
Parameters
- grid ChartForgeX.Core.ChartGrid
- placement ChartForgeX.Composition.VisualCanvasPlacement
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
public ImageComposition DrawDashedLine(Double x0, Double y0, Double x1, Double y1, ChartColor color, Double thickness = 1, Double dash = 6, Double gap = 5) #ImageCompositionDraws a dashed line segment.
Parameters
- x0 System.Double
- y0 System.Double
- x1 System.Double
- y1 System.Double
- color ChartForgeX.Primitives.ChartColor
- thickness System.Double = 1
- dash System.Double = 6
- gap System.Double = 5
public ImageComposition DrawImage(RgbaImage image, Double x, Double y, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1) #ImageCompositionDraws an image into an explicit destination rectangle.
Parameters
- image ChartForgeX.Raster.RgbaImage
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
public ImageComposition DrawImage(RgbaImage image, VisualCanvasPlacement placement, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1) #ImageCompositionDraws an image using anchor-based placement.
Parameters
- image ChartForgeX.Raster.RgbaImage
- placement ChartForgeX.Composition.VisualCanvasPlacement
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
public ImageComposition DrawImageBytes(Byte[] data, Double x, Double y, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1, RasterDecodeOptions? options = null) #ImageCompositionDecodes image bytes within the requested limits and draws them into an explicit destination rectangle.
Parameters
- data System.Byte[]
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
- options ChartForgeX.Raster.RasterDecodeOptions? = null
public ImageComposition DrawImageBytes(Byte[] data, VisualCanvasPlacement placement, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1, RasterDecodeOptions? options = null) #ImageCompositionDecodes image bytes within the requested limits and draws them using anchor-based placement.
Parameters
- data System.Byte[]
- placement ChartForgeX.Composition.VisualCanvasPlacement
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
- options ChartForgeX.Raster.RasterDecodeOptions? = null
public ImageComposition DrawImageFile(String path, Double x, Double y, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1, RasterDecodeOptions? options = null) #ImageCompositionReads and decodes an image file within the requested limits and draws it into an explicit destination rectangle.
Parameters
- path System.String
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
- options ChartForgeX.Raster.RasterDecodeOptions? = null
public ImageComposition DrawImageFile(String path, VisualCanvasPlacement placement, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1, RasterDecodeOptions? options = null) #ImageCompositionReads and decodes an image file within the requested limits and draws it using anchor-based placement.
Parameters
- path System.String
- placement ChartForgeX.Composition.VisualCanvasPlacement
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
- options ChartForgeX.Raster.RasterDecodeOptions? = null
public ImageComposition DrawLine(Double x0, Double y0, Double x1, Double y1, ChartColor color, Double thickness = 1) #ImageCompositionDraws a line segment.
Parameters
- x0 System.Double
- y0 System.Double
- x1 System.Double
- y1 System.Double
- color ChartForgeX.Primitives.ChartColor
- thickness System.Double = 1
public ImageComposition DrawProgressRing(Double centerX, Double centerY, Double radius, Double thickness, Double fraction, ChartColor trackColor, ChartColor color, Double startAngle = -90) #ImageCompositionDraws a progress ring: a full track with a round-capped arc over it that covers fraction of the ring, clockwise from startAngle degrees (-90 is twelve o'clock). A fraction of zero draws only the track; one or more fills the ring.
Parameters
- centerX System.Double
- centerY System.Double
- radius System.Double
- thickness System.Double
- fraction System.Double
- trackColor ChartForgeX.Primitives.ChartColor
- color ChartForgeX.Primitives.ChartColor
- startAngle System.Double = -90
public ImageComposition DrawText(Double x, Double y, Double width, String text, Double fontSize, ChartColor color, TextAlignment alignment = Left, Boolean emphasized = false) #ImageCompositionDraws text inside a fixed-width region.
Parameters
- x System.Double
- y System.Double
- width System.Double
- text System.String
- fontSize System.Double
- color ChartForgeX.Primitives.ChartColor
- alignment ChartForgeX.Typography.TextAlignment = Left
- emphasized System.Boolean = false
public ImageComposition DrawText(Double x, Double y, Double width, String text, TextStyle style, TextWrapMode wrapMode = Word, Int32? maximumLines = null, TextTrimming trimming = Ellipsis) #ImageCompositionDraws measured and optionally wrapped text with the shared dependency-free typography engine.
Parameters
- x System.Double
- y System.Double
- width System.Double
- text System.String
- style ChartForgeX.Typography.TextStyle
- wrapMode ChartForgeX.Typography.TextWrapMode = Word
- maximumLines System.Int32? = null
- trimming ChartForgeX.Typography.TextTrimming = Ellipsis
public ImageComposition DrawTopology(TopologyChart topology, Double x, Double y, Double width, Double height, TopologyRenderOptions? options = null, VisualCanvasImageFit fit = Stretch, Double opacity = 1) #ImageCompositionDraws a topology chart layer.
Parameters
- topology ChartForgeX.Topology.TopologyChart
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- options ChartForgeX.Topology.TopologyRenderOptions? = null
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
public ImageComposition DrawTopology(TopologyChart topology, VisualCanvasPlacement placement, Double width, Double height, TopologyRenderOptions? options = null, VisualCanvasImageFit fit = Stretch, Double opacity = 1) #ImageCompositionDraws a topology chart layer using anchor-based placement.
Parameters
- topology ChartForgeX.Topology.TopologyChart
- placement ChartForgeX.Composition.VisualCanvasPlacement
- width System.Double
- height System.Double
- options ChartForgeX.Topology.TopologyRenderOptions? = null
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
public ImageComposition DrawVisualBlock(IVisualBlock block, Double x, Double y, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1) #ImageCompositionDraws a visual block layer.
Parameters
- block ChartForgeX.VisualBlocks.IVisualBlock
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
public ImageComposition DrawVisualBlock(IVisualBlock block, VisualCanvasPlacement placement, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1) #ImageCompositionDraws a visual block layer using anchor-based placement.
Parameters
- block ChartForgeX.VisualBlocks.IVisualBlock
- placement ChartForgeX.Composition.VisualCanvasPlacement
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
public ImageComposition DrawVisualCanvas(VisualCanvas canvas, Double x, Double y, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1) #ImageCompositionDraws a visual canvas layer.
Parameters
- canvas ChartForgeX.Composition.VisualCanvas
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
public ImageComposition DrawVisualCanvas(VisualCanvas canvas, VisualCanvasPlacement placement, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1) #ImageCompositionDraws a visual canvas layer using anchor-based placement.
Parameters
- canvas ChartForgeX.Composition.VisualCanvas
- placement ChartForgeX.Composition.VisualCanvasPlacement
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
public ImageComposition DrawVisualGrid(VisualGrid grid, Double x, Double y, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1) #ImageCompositionDraws a visual grid layer.
Parameters
- grid ChartForgeX.VisualBlocks.VisualGrid
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
public ImageComposition DrawVisualGrid(VisualGrid grid, VisualCanvasPlacement placement, Double width, Double height, VisualCanvasImageFit fit = Stretch, Double opacity = 1) #ImageCompositionDraws a visual grid layer using anchor-based placement.
Parameters
- grid ChartForgeX.VisualBlocks.VisualGrid
- placement ChartForgeX.Composition.VisualCanvasPlacement
- width System.Double
- height System.Double
- fit ChartForgeX.Composition.VisualCanvasImageFit = Stretch
- opacity System.Double = 1
public ImageComposition FillCircle(Double centerX, Double centerY, Double radius, ChartColor color) #ImageCompositionDraws a filled, antialiased circle.
Parameters
- centerX System.Double
- centerY System.Double
- radius System.Double
- color ChartForgeX.Primitives.ChartColor
public ImageComposition FillEllipse(Double centerX, Double centerY, Double radiusX, Double radiusY, ChartColor color) #ImageCompositionDraws a filled, antialiased ellipse.
Parameters
- centerX System.Double
- centerY System.Double
- radiusX System.Double
- radiusY System.Double
- color ChartForgeX.Primitives.ChartColor
public ImageComposition FillRectangle(Double x, Double y, Double width, Double height, ChartColor color) #ImageCompositionDraws a filled rectangle.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- color ChartForgeX.Primitives.ChartColor
public ImageComposition FillRectangleLinearGradient(Double x, Double y, Double width, Double height, ChartColor startColor, ChartColor endColor, Double angle = 90, Double radius = 0) #ImageCompositionFills a rectangle with a two-color linear gradient. The angle is in degrees: 0 runs left to right and 90 (the default) runs top to bottom. A positive radius rounds the corners.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- startColor ChartForgeX.Primitives.ChartColor
- endColor ChartForgeX.Primitives.ChartColor
- angle System.Double = 90
- radius System.Double = 0
public ImageComposition FillRectangleRadialGradient(Double x, Double y, Double width, Double height, Double gradientCenterX, Double gradientCenterY, Double gradientRadius, ChartColor innerColor, ChartColor outerColor, Double radius = 0) #ImageCompositionFills a rectangle with a two-color radial gradient: innerColor at the gradient center fading to outerColor at gradientRadius and beyond. The center is in composition coordinates and may lie outside the rectangle. A positive radius rounds the corners.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- gradientCenterX System.Double
- gradientCenterY System.Double
- gradientRadius System.Double
- innerColor ChartForgeX.Primitives.ChartColor
- outerColor ChartForgeX.Primitives.ChartColor
- radius System.Double = 0
public ImageComposition FillRoundedRectangle(Double x, Double y, Double width, Double height, Double radius, ChartColor color) #ImageCompositionDraws a filled rounded rectangle.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- radius System.Double
- color ChartForgeX.Primitives.ChartColor
public static ImageComposition FromBytes(Byte[] data, RasterDecodeOptions? options = null) #ImageCompositionLoads image bytes within the requested decode limits and creates a composition with the decoded pixels.
Parameters
- data System.Byte[]
- options ChartForgeX.Raster.RasterDecodeOptions? = null
public static ImageComposition FromFile(String path, RasterDecodeOptions? options = null) #ImageCompositionReads an image file within the requested encoded-byte and pixel limits and creates a composition with the decoded pixels.
Parameters
- path System.String
- options ChartForgeX.Raster.RasterDecodeOptions? = null
public static ImageComposition FromImage(RgbaImage image) #ImageCompositionCreates a composition initialized with an independent copy of the supplied image pixels.
Parameters
- image ChartForgeX.Raster.RgbaImage
public Void Save(String path, RasterImageFormat format, RasterImageOptions? options = null) #VoidSaves the composition to a raster file using an explicit format.
Parameters
- path System.String
- format ChartForgeX.Core.RasterImageFormat
- options ChartForgeX.Core.RasterImageOptions? = null
public Void Save(String path, RasterImageOptions? options = null) #VoidSaves the composition to a raster file using the output extension to choose the format.
Parameters
- path System.String
- options ChartForgeX.Core.RasterImageOptions? = null
public ImageComposition StrokeCircle(Double centerX, Double centerY, Double radius, ChartColor color, Double thickness = 1) #ImageCompositionDraws an antialiased circle outline centered on the radius.
Parameters
- centerX System.Double
- centerY System.Double
- radius System.Double
- color ChartForgeX.Primitives.ChartColor
- thickness System.Double = 1
public ImageComposition StrokeEllipse(Double centerX, Double centerY, Double radiusX, Double radiusY, ChartColor color, Double thickness = 1) #ImageCompositionDraws an antialiased ellipse outline centered on the radii.
Parameters
- centerX System.Double
- centerY System.Double
- radiusX System.Double
- radiusY System.Double
- color ChartForgeX.Primitives.ChartColor
- thickness System.Double = 1
public ImageComposition StrokeRectangle(Double x, Double y, Double width, Double height, ChartColor color, Double thickness = 1) #ImageCompositionDraws a rectangle outline.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- color ChartForgeX.Primitives.ChartColor
- thickness System.Double = 1
public ImageComposition StrokeRoundedRectangle(Double x, Double y, Double width, Double height, Double radius, ChartColor color, Double thickness = 1) #ImageCompositionDraws a rounded rectangle outline.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- radius System.Double
- color ChartForgeX.Primitives.ChartColor
- thickness System.Double = 1
public Byte[] ToJpeg(RasterImageOptions? options = null) #Byte[]Encodes the composition to JPEG bytes.
Parameters
- options ChartForgeX.Core.RasterImageOptions? = null
public Byte[] ToRasterImage(RasterImageFormat format, RasterImageOptions? options = null) #Byte[]Encodes the composition to a static dependency-free raster format.
Parameters
- format ChartForgeX.Core.RasterImageFormat
- options ChartForgeX.Core.RasterImageOptions? = null
public static Boolean TryFromBytes(Byte[]? data, out ImageComposition? composition, RasterDecodeOptions? options = null) #BooleanAttempts to load image bytes and create a composition with the decoded pixels.
Parameters
- data System.Byte[]?
- composition ChartForgeX.Composition.ImageComposition?
- options ChartForgeX.Raster.RasterDecodeOptions? = null
public static Boolean TryFromFile(String? path, out ImageComposition? composition, RasterDecodeOptions? options = null) #BooleanAttempts to load an image file and create a composition with the decoded pixels.
Parameters
- path System.String?
- composition ChartForgeX.Composition.ImageComposition?
- options ChartForgeX.Raster.RasterDecodeOptions? = null
public Void Write(Stream stream, RasterImageFormat format, RasterImageOptions? options = null) #VoidWrites the composition to a raster stream.
Parameters
- stream System.IO.Stream
- format ChartForgeX.Core.RasterImageFormat
- options ChartForgeX.Core.RasterImageOptions? = null
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?