Gum Standard Element Codegen Requirements
NetStandardWhen working with Gum standard elements and their code generation, be aware of how different types handle properties:
- Skia-based Elements:
Arc,ColoredCircle,LottieAnimation,RoundedRectangle,Svg, andCanvasshareSkiaGum.Renderables.RenderableSkiaObject. These support the full fill, stroke, gradient, and dropshadow surface. - Color Conversion: The universal
Colorproperty is XNA-Colortyped, but the backing types useSystem.Drawing.Color. A version-gated conversion (ToXNA/ToSystemDrawing) is used based onFileVersion >= GluxVersions.GumUsesSystemTypes. - Known Element Behaviors:
- Polygon: Uses a dedicated custom getter/setter for
Red/Green/Blue/AlphaontoLinePolygon.Color.Pointsis aVariableListSaveand is not iterated by the codegen pipeline. - NineSlice: The
Animateproperty is version-gated. Ensure both the property pipeline and the state-pipeline use matching gates based onGluxVersions.GumNineSliceHasAnimateto avoid compilation errors. - Sprite: The
RenderTargetTextureSourceproperty is managed bySpriteCodeGenerator.GenerateIRenderTargetTextureReferencerPropertiesto ensure correct typing (e.g.,IRenderableIpso?). - Container: Does not have a backing runtime type and does not support
SourceShaderFile.
- Polygon: Uses a dedicated custom getter/setter for