Models
subsurfaceio.graphics.models
Classes:
| Name | Description |
|---|---|
Graphic |
|
Graphics |
|
SVGDefinitions |
|
TileConfiguration |
|
Attributes:
| Name | Type | Description |
|---|---|---|
PATTERN_FILL_OPACITY |
|
|
SVG_PATTERN_SCALE |
|
Graphic
pydantic-model
Bases: BaseModel
Config:
frozen:True
Fields:
-
name(str) -
description(str | None) -
category(str) -
tiles_configuration(tuple[TileConfiguration, ...])
generate_svg
generate_svg(
solid_fill_color: str = "#000",
include_definitions: bool = True,
svg_width: float | None = None,
svg_height: float | None = None,
) -> str
Render the graphic to an SVG string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
solid_fill_color
|
str
|
CSS color used for SOLID tiles. |
'#000'
|
include_definitions
|
bool
|
Whether to embed |
True
|
svg_width
|
float | None
|
Actual pixel width; used to resolve 'Expand Horizontal' tiles. |
None
|
svg_height
|
float | None
|
Actual pixel height; used to resolve 'Expand Vertical' tiles. |
None
|
Graphics
pydantic-model
SVGDefinitions
pydantic-model
TileConfiguration
pydantic-model
Bases: BaseModel
Config:
frozen:True
Fields:
-
tile_symbol(str | None) -
from_pct(float) -
to_pct(float) -
vertical_borders(Literal['Left', 'Right', 'Both'] | None) -
scale(float | None)