Represents a layout used for drawing operations. More...
Public Member Functions | |
| DrawingLayout () | |
| Initializes a new instance of the DrawingLayout class. | |
| RenderContext | BeginRender (RenderContext parentRenderContext) |
| Begins rendering the layout using the specified parent render context. | |
| void | EndRender (RenderContext renderContext) |
| Ends rendering the layout using the specified render context. | |
| override string | ToString () |
| bool | SetSizeAndCheckIsNeedToRedraw (RenderContext parentRenderContext, int width, int height) |
| Sets the size of the layout and checks if the layout needs to be redrawn. | |
| void | Invalidate () |
| Marks the layout content as changed so it will be re-rendered. | |
| void | CommitRenderedVersion (long version) |
| Commits a rendered content version after the frame that carried it was successfully presented. Monotonic: an older version never overwrites a newer commit. | |
| void | Clear () |
| Marks the layout as modified, indicating that it needs to be redrawn. | |
Public Attributes | |
| readonly int | ID = ++MaxID |
Properties | |
| long | ContentVersion [get] |
| Gets the version of the layout content. Producers bump it (via Invalidate) whenever the content changes. | |
| bool | Modified [get, set] |
Gets or sets flag that this layout must be re-rendered. Invalidation needed if one of child layouts was changed or cached bitmaps were lost (resize). Setting true is an alias for Invalidate; setting false is a no-op — dirtiness is cleared only by committing a rendered version, never by the producer, so a dropped frame cannot mark stale content as valid. | |
| string | Name [get, set] |
| Gets or sets the name of layout for debugging. | |
| int | Width = 10 [get] |
| Gets the width of the drawing layout. | |
| int | Height = 10 [get] |
| Gets the height of the drawing layout. | |
| Size | Size [get] |
| Gets the size of the drawing layout as a Size object. | |
Represents a layout used for drawing operations.
Threading: producers may bump the content version (Invalidate / Modified) from any thread, but rendering a layout is single-threaded by contract — BeginRender/EndRender of the same layout must not overlap (the version staged for commit is a single slot). WPF serializes frames per control, PlatformX per chart.
| OFT.Rendering.DrawingLayout.DrawingLayout | ( | ) |
Initializes a new instance of the DrawingLayout class.
| RenderContext OFT.Rendering.DrawingLayout.BeginRender | ( | RenderContext | parentRenderContext | ) |
Begins rendering the layout using the specified parent render context.
| parentRenderContext | The parent render context to use for rendering. |
| ArgumentNullException | Thrown if the parentRenderContext is null. |
| RenderException | Thrown if the render context creation fails. |
| void OFT.Rendering.DrawingLayout.Clear | ( | ) |
Marks the layout as modified, indicating that it needs to be redrawn.
| void OFT.Rendering.DrawingLayout.CommitRenderedVersion | ( | long | version | ) |
Commits a rendered content version after the frame that carried it was successfully presented. Monotonic: an older version never overwrites a newer commit.
| void OFT.Rendering.DrawingLayout.EndRender | ( | RenderContext | renderContext | ) |
Ends rendering the layout using the specified render context.
| renderContext | The render context used for rendering the layout. |
| RenderException | Thrown if the specified renderContext is null. Make sure to call BeginRender(RenderContext) before calling this method. |
| void OFT.Rendering.DrawingLayout.Invalidate | ( | ) |
Marks the layout content as changed so it will be re-rendered.
| bool OFT.Rendering.DrawingLayout.SetSizeAndCheckIsNeedToRedraw | ( | RenderContext | parentRenderContext, |
| int | width, | ||
| int | height | ||
| ) |
Sets the size of the layout and checks if the layout needs to be redrawn.
| parentRenderContext | The parent render context used for checking font anti-aliasing settings. |
| width | The new width of the layout. |
| height | The new height of the layout. |
| override string OFT.Rendering.DrawingLayout.ToString | ( | ) |
| readonly int OFT.Rendering.DrawingLayout.ID = ++MaxID |
|
get |
Gets the version of the layout content. Producers bump it (via Invalidate) whenever the content changes.
|
get |
Gets the height of the drawing layout.
|
getset |
Gets or sets flag that this layout must be re-rendered. Invalidation needed if one of child layouts was changed or cached bitmaps were lost (resize). Setting true is an alias for Invalidate; setting false is a no-op — dirtiness is cleared only by committing a rendered version, never by the producer, so a dropped frame cannot mark stale content as valid.
|
getset |
Gets or sets the name of layout for debugging.
|
get |
Gets the size of the drawing layout as a Size object.
|
get |
Gets the width of the drawing layout.