API reference

aster_blueprint::stock_material

Pre-1.0: signatures are not frozen. Generated from rustdoc JSON of the compiled crate; rustdoc JSON format version 60. Only public items are listed.

The rounded material primitive: a reusable card surface over the existing blueprint vocabulary.

This module authors exactly one reusable thing: a rounded card. It reuses the existing core.rect.v1 layout kernel for the caller-defaulted bounds and the existing core.drawing.rounded_rect.v1 visual kernel for the actual qualified rounded shape. The surface paint is one named host resource, [HOST_PAINT] (ui.card.material, ValueType::Paint), which the caller resolves through the existing theme/instance vocabulary and the existing ResourceArena glue. It adds no kernel, no model type, no theme, no dictionary, no painter, no layout engine and no router.

The graph is only the two existing nodes plus five caller-defaulted LogicalLength parameters. Its outputs are the bounds rect ([OUTPUT_BOUNDS], LogicalRect) and the actual rounded drawing ([OUTPUT_DRAWING], Drawing). A [card_visual] describes the retained visual over the prepared drawing output, so the committed content is the real kernel recording, never a substituted color fill.

This is a rounded material primitive, not a complete stock control. It is not a button, not an input and not a stock library, and it leaves the existing color-card preset (presets::card) untouched.

Structs

structaster_blueprint::stock_material::StockCardOptions

pub struct StockCardOptions { /* see fields */ }

Caller-chosen default geometry of the rounded card.

The values are parameter defaults of the card graph, not baked literals: the caller may replace them at evaluation time through the real parameter plane.

Public fields

fieldtype
xf64
yf64
widthf64
heightf64
radiusf64

Trait implementations: Clone, Copy, Debug, Default, PartialEq, StructuralPartialEq

Enums

enumaster_blueprint::stock_material::StockCardError

pub enum StockCardError { Model, Geometry }

A refusal of the rounded material layer. It never carries a rendered value.

Variants

  • Model — An authored name was refused by the model layer.
  • Geometry — The requested geometry cannot produce a valid rounded card.

Trait implementations: Debug, Display, Error, From<ModelError>

Functions

fnaster_blueprint::stock_material::card_visual

pub fn card_visual(model_key: aster_ui::ModelKey) -> retained::VisualSpec

The visual specification of one rounded card.

The key is the rounded-rect node key ([SHAPE_NODE]), the bounds output is [OUTPUT_BOUNDS] and the content is the prepared [OUTPUT_DRAWING] of the real rounded-rect kernel. The model_key is the caller's own retained identity; this module never infers one.

fnaster_blueprint::stock_material::rounded_card

pub fn rounded_card(asset: model::Symbol, options: StockCardOptions) -> Result<model::GraphSource, StockCardError>

The rounded-card graph.

The graph is the existing core.rect.v1 node plus the existing core.drawing.rounded_rect.v1 node. The rect reads the caller-defaulted card.x/card.y/card.width/card.height parameters; the rounded-rect kernel reads the same width/height plus card.radius and the [HOST_PAINT] host resource. The graph declares the outputs [OUTPUT_BOUNDS] (LogicalRect) and [OUTPUT_DRAWING] (Drawing).

The compiler Environment is supplied by the caller: this function authors no resource table of its own.

fnaster_blueprint::stock_material::shape_key

pub fn shape_key() -> model::NodeKey

Node key of the rounded-rect node, used by the retained visual.

Constants

constaster_blueprint::stock_material::HOST_PAINT

pub const HOST_PAINT: &str

Host paint resource of the rounded card surface.

The caller declares this name in its theme/instance vocabulary as a host Paint and resolves it through the existing prepared-resource glue. This module never authors a paint value itself.

constaster_blueprint::stock_material::OUTPUT_BOUNDS

pub const OUTPUT_BOUNDS: &str

Output of the card bounds rect, LogicalRect.

constaster_blueprint::stock_material::OUTPUT_DRAWING

pub const OUTPUT_DRAWING: &str

Output of the card rounded drawing, Drawing.

constaster_blueprint::stock_material::PARAM_HEIGHT

pub const PARAM_HEIGHT: &str

Height of the card, in logical units.

constaster_blueprint::stock_material::PARAM_RADIUS

pub const PARAM_RADIUS: &str

Corner radius of the card, in logical units.

constaster_blueprint::stock_material::PARAM_WIDTH

pub const PARAM_WIDTH: &str

Width of the card, in logical units.

constaster_blueprint::stock_material::PARAM_X

pub const PARAM_X: &str

Left edge of the card, in logical units.

constaster_blueprint::stock_material::PARAM_Y

pub const PARAM_Y: &str

Top edge of the card, in logical units.

constaster_blueprint::stock_material::RECT_NODE

pub const RECT_NODE: u64

Node key of the bounds rect node.

constaster_blueprint::stock_material::SHAPE_NODE

pub const SHAPE_NODE: u64

Node key of the rounded-rect node; it is also the key of the visual.