pub struct RuleOfThirdsGrid { /* private fields */ }Expand description
A composition grid over a picture: thirds by default, or the other CompositionGuides. It
takes no input, so what is underneath still gets the pointer.
use ravenrs_core::Size;
use ravenrs_widgets::{CompositionGuide, ContentSpace, RuleOfThirdsGrid};
let grid = RuleOfThirdsGrid::new()
.guide(CompositionGuide::GoldenRatio)
.space(ContentSpace::Fit(Size::new(6000.0, 4000.0)))
.size(300.0, 200.0);Implementations§
Source§impl RuleOfThirdsGrid
impl RuleOfThirdsGrid
Sourcepub fn new() -> RuleOfThirdsGrid
pub fn new() -> RuleOfThirdsGrid
Thirds over the whole content.
Sourcepub fn guide(self, guide: CompositionGuide) -> RuleOfThirdsGrid
pub fn guide(self, guide: CompositionGuide) -> RuleOfThirdsGrid
Which lines it draws.
Sourcepub fn area(self, area: Rect) -> RuleOfThirdsGrid
pub fn area(self, area: Rect) -> RuleOfThirdsGrid
Draws only inside this rectangle of the content, such as a crop.
Sourcepub fn color(self, color: Color) -> RuleOfThirdsGrid
pub fn color(self, color: Color) -> RuleOfThirdsGrid
The color of the lines, instead of a light line with a dark one beside it.
Source§impl RuleOfThirdsGrid
impl RuleOfThirdsGrid
Sourcepub fn size(self, width: f32, height: f32) -> RuleOfThirdsGrid
pub fn size(self, width: f32, height: f32) -> RuleOfThirdsGrid
Fixed size in logical pixels, instead of taking the free space.
Sourcepub fn grow(self, grow: f32) -> RuleOfThirdsGrid
pub fn grow(self, grow: f32) -> RuleOfThirdsGrid
How much of the free space along the parent stack it takes: 1 by default, or 0 over a stage, which then decides the size.
Sourcepub fn stage(self, stage: impl View + 'static) -> RuleOfThirdsGrid
pub fn stage(self, stage: impl View + 'static) -> RuleOfThirdsGrid
The view it goes over, such as an Image or a
ZoomPanView, which gives it its size. Without one, put it in
a ZStack with a fixed size.
Sourcepub fn space(self, space: ContentSpace) -> RuleOfThirdsGrid
pub fn space(self, space: ContentSpace) -> RuleOfThirdsGrid
Where the content is, and so the units of its coordinates: by default, its own box.
Trait Implementations§
Source§impl Debug for RuleOfThirdsGrid
impl Debug for RuleOfThirdsGrid
Source§impl Default for RuleOfThirdsGrid
impl Default for RuleOfThirdsGrid
Source§fn default() -> RuleOfThirdsGrid
fn default() -> RuleOfThirdsGrid
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for RuleOfThirdsGrid
impl !Send for RuleOfThirdsGrid
impl !Sync for RuleOfThirdsGrid
impl !UnwindSafe for RuleOfThirdsGrid
impl Freeze for RuleOfThirdsGrid
impl Unpin for RuleOfThirdsGrid
impl UnsafeUnpin for RuleOfThirdsGrid
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T, U> ToSample<U> for Twhere
U: FromSample<T>,
impl<T, U> ToSample<U> for Twhere
U: FromSample<T>,
fn to_sample_(self) -> U
Source§impl<V> ViewExt for Vwhere
V: View,
impl<V> ViewExt for Vwhere
V: View,
Source§fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
Adds padding inside the box, in logical pixels.
Source§fn background(self, fill: impl Into<Fill>) -> Styled<Self>
fn background(self, fill: impl Into<Fill>) -> Styled<Self>
Paints a background behind the content.
Source§fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
Fixes the width and/or height in logical pixels;
None keeps the content size.