reflexo_typst2vec::vm

Trait TransformContext

Source
pub trait TransformContext<C>: Sized {
    // Required methods
    fn transform_matrix(self, ctx: &mut C, matrix: &Transform) -> Self;
    fn transform_translate(self, ctx: &mut C, xy: Axes<Scalar>) -> Self;
    fn transform_scale(self, ctx: &mut C, x: Scalar, y: Scalar) -> Self;
    fn transform_rotate(self, ctx: &mut C, angle: Scalar) -> Self;
    fn transform_skew(self, ctx: &mut C, xy: (Scalar, Scalar)) -> Self;
    fn transform_clip(self, ctx: &mut C, path: &PathItem) -> Self;

    // Provided method
    fn transform(self, ctx: &mut C, transform: &TransformItem) -> Self { ... }
}
Expand description

A build pattern for applying transforms to the group of items. See ir::Transform.

Required Methods§

Source

fn transform_matrix(self, ctx: &mut C, matrix: &Transform) -> Self

Source

fn transform_translate(self, ctx: &mut C, xy: Axes<Scalar>) -> Self

Source

fn transform_scale(self, ctx: &mut C, x: Scalar, y: Scalar) -> Self

Source

fn transform_rotate(self, ctx: &mut C, angle: Scalar) -> Self

Source

fn transform_skew(self, ctx: &mut C, xy: (Scalar, Scalar)) -> Self

Source

fn transform_clip(self, ctx: &mut C, path: &PathItem) -> Self

Provided Methods§

Source

fn transform(self, ctx: &mut C, transform: &TransformItem) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§