GeometryBuilder
struct · ferroui-base · v0.5.0
struct GeometryBuilder
Contains internal helpers used to build and draw various geometries.
Members
draw_rounded_corners_rectangle_keypoints
fn draw_rounded_corners_rectangle_keypoints(context: &mut StreamGeometryContext, keypoints: &RoundedRectKeypoints)
Draws a new rounded rectangle within the given geometry context.
Warning: The caller must manage and dispose the StreamGeometryContext externally.
context- The geometry context to draw into.keypoints- The rounded rectangle keypoints defining the rectangle to draw.
calculate_rounded_corners_rectangle_win_ui
fn calculate_rounded_corners_rectangle_win_ui(outer_bounds: Rect, border_thickness: Thickness, corner_radius: CornerRadius, sizing: BackgroundSizing) -> RoundedRectKeypoints
Calculates the keypoints of a rounded rectangle based on the algorithm in WinUI. These keypoints may then be drawn or transformed into other types.
outer_bounds- The outer bounds of the rounded rectangle. This should be the overall bounds and size of the shape/control without any corner radii or border thickness adjustments.border_thickness- The unadjusted border thickness of the rounded rectangle.corner_radius- The unadjusted corner radii of the rounded rectangle. The corner radius is defined to be the middle of the border stroke (center of the border).sizing- The sizing mode used to calculate the final rounded rectangle size.
Returns new rounded rectangle keypoints.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.