Module kas_core::draw

source ·
Expand description

Draw APIs

Multiple drawing APIs are available. Each has a slightly different purpose:

Text may be drawn by either DrawCx or DrawIface with a slightly different API (using theme properties or directly specifying colors and effects).

Draw order

All draw operations happen within a “draw pass”. The first pass corresponds to the window, while additional passes may be clipped and offset (see DrawIface::new_pass). Draw passes are executed sequentially in the order defined.

Within each pass, draw operations may be batched, thus draw operations may not happen in the order queued. Exact behaviour is defined by the graphics backend. In general, it may be expected that batches are executed in the following order:

  1. Square-edged primitives (e.g. Draw::rect)
  2. Images
  3. Rounded or other partially-transparent primitives (e.g. DrawRounded::circle)
  4. Custom draw routines (CustomPipe)
  5. Text

Re-exports

  • pub use draw::DrawImpl;
    internal_doc
  • pub use draw_rounded::DrawRoundedImpl;
    internal_doc
  • pub use draw_shared::DrawSharedImpl;
    internal_doc

Modules

Structs

Enums

Traits