Gondwana Game Engine Development (master) - 2.7.0
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
Loading...
Searching...
No Matches
DirectEllipse.cs
1using System.Drawing;
5using SkiaSharp;
6
8
10public sealed class DirectEllipse : DirectShapeBase<DirectEllipse>
11{
13 public DirectEllipse(Color color, RenderSurfaceHostBase host, SceneLayer sceneLayer, Rectangle worldBounds, string? nickname = null)
14 : base(color, host, DirectDrawingMode.SceneLayer, sceneLayer, null, worldBounds, nickname)
15 {
16 }
17
19 public DirectEllipse(Color color, RenderSurfaceHostBase host, View view, Rectangle screenBounds, string? nickname = null)
20 : base(color, host, DirectDrawingMode.View, null, view, screenBounds, nickname)
21 {
22 }
23
25 public DirectEllipse SetFillColor(Color? color) => SetShapeFill(color);
26
28 protected override void DrawGeometry(SKCanvas canvas, SKRect bounds, SKPaint paint) =>
29 canvas.DrawOval(bounds, paint);
30}
override void DrawGeometry(SKCanvas canvas, SKRect bounds, SKPaint paint)
DirectEllipse(Color color, RenderSurfaceHostBase host, View view, Rectangle screenBounds, string? nickname=null)
Creates a view-space ellipse within the supplied bounds.
DirectEllipse(Color color, RenderSurfaceHostBase host, SceneLayer sceneLayer, Rectangle worldBounds, string? nickname=null)
Creates a scene-layer ellipse within the supplied bounds.
DirectEllipse SetFillColor(Color? color)
Sets the interior color, or null to disable filling.
TShape SetShapeFill(Color? color)
Sets or clears the fill of a fillable shape.
DirectShapeBase(Color color, RenderSurfaceHostBase host, DirectDrawingMode mode, SceneLayer? sceneLayer, View? view, Rectangle bounds, string? nickname)
Represents a base class for hosting a render surface, providing functionality for managing rendering ...
DirectDrawingMode
Specifies where direct drawing operations are applied within the rendering pipeline.
@ View
Performs direct drawing at the view level using screen-space coordinates.
@ SceneLayer
Performs direct drawing within a scene layer using world-space coordinates.