Skip to main content

load_pattern

Function load_pattern 

Source
pub fn load_pattern<R: Resolve>(
    name: &Name,
    resources: &Resources,
    parent_matrix: Affine,
    general: &GeneralState,
    r: &R,
    ctx: &mut BuildContext,
    limits: &Limits,
    diags: &mut Diagnostics,
) -> FoundPattern
Expand description

A pattern named in a colour value, looked up through the resources.

parent_matrix anchors it, not the current transform — patterns live in the space they were declared in. general is the painting object’s general state, which a tiling pattern’s cell inherits wholesale — alpha, blend mode and soft mask — while taking default colour, text and path state, so /ca 0.5 on the filling object fades the tiles.

See FoundPattern for why “the resource exists” and “the pattern loads” are two answers rather than one.