pub struct PathMeasure { /* private fields */ }
v4_14
only.Expand description
PathMeasure
is an object that allows measurements
on Path
s such as determining the length of the path.
Many measuring operations require sampling the path length
at intermediate points. Therefore, a PathMeasure
has
a tolerance that determines what precision is required
for such approximations.
A PathMeasure
struct is a reference counted struct
and should be treated as opaque.
GLib type: Shared boxed type with reference counted clone semantics.
Implementations§
Source§impl PathMeasure
impl PathMeasure
Sourcepub fn as_ptr(&self) -> *mut GskPathMeasure
pub fn as_ptr(&self) -> *mut GskPathMeasure
Return the inner pointer to the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow(ptr: &*mut GskPathMeasure) -> &Self
pub unsafe fn from_glib_ptr_borrow(ptr: &*mut GskPathMeasure) -> &Self
Borrows the underlying C value.
Source§impl PathMeasure
impl PathMeasure
Sourcepub fn new(path: &Path) -> PathMeasure
pub fn new(path: &Path) -> PathMeasure
Creates a measure object for the given @path with the default tolerance.
§path
the path to measure
§Returns
a new PathMeasure
representing @path
Sourcepub fn with_tolerance(path: &Path, tolerance: f32) -> PathMeasure
pub fn with_tolerance(path: &Path, tolerance: f32) -> PathMeasure
Creates a measure object for the given @path and @tolerance.
§path
the path to measure
§tolerance
the tolerance for measuring operations
§Returns
a new PathMeasure
representing @path
Sourcepub fn length(&self) -> f32
pub fn length(&self) -> f32
Gets the length of the path being measured.
The length is cached, so this function does not do any work.
§Returns
The length of the path measured by @self
Trait Implementations§
Source§impl Clone for PathMeasure
impl Clone for PathMeasure
Source§impl Debug for PathMeasure
impl Debug for PathMeasure
Source§impl From<PathMeasure> for Value
impl From<PathMeasure> for Value
Source§fn from(s: PathMeasure) -> Self
fn from(s: PathMeasure) -> Self
Source§impl HasParamSpec for PathMeasure
impl HasParamSpec for PathMeasure
type ParamSpec = ParamSpecBoxed
Source§type SetValue = PathMeasure
type SetValue = PathMeasure
type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, PathMeasure>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for PathMeasure
impl Hash for PathMeasure
Source§impl Ord for PathMeasure
impl Ord for PathMeasure
Source§fn cmp(&self, other: &PathMeasure) -> Ordering
fn cmp(&self, other: &PathMeasure) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PathMeasure
impl PartialEq for PathMeasure
Source§impl PartialOrd for PathMeasure
impl PartialOrd for PathMeasure
Source§impl StaticType for PathMeasure
impl StaticType for PathMeasure
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for PathMeasure
impl StructuralPartialEq for PathMeasure
Auto Trait Implementations§
impl Freeze for PathMeasure
impl RefUnwindSafe for PathMeasure
impl !Send for PathMeasure
impl !Sync for PathMeasure
impl Unpin for PathMeasure
impl UnwindSafe for PathMeasure
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)