Trait direct2d::geometry::Geometry
[−]
[src]
pub trait Geometry { unsafe fn get_ptr(&self) -> *mut ID2D1Geometry; fn get_factory(&self) -> Factory { ... } fn to_generic(&self) -> GenericGeometry { ... } fn get_bounds(
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<RectF, D2D1Error> { ... } fn get_widened_bounds(
&self,
stroke_width: f32,
stroke_style: Option<&StrokeStyle>,
world_transform: Option<&Matrix3x2F>
) -> Result<RectF, D2D1Error> { ... } fn stroke_contains_point(
&self,
point: Point2F,
stroke_width: f32,
stroke_style: Option<&StrokeStyle>,
world_transform: Option<&Matrix3x2F>
) -> Result<bool, D2D1Error> { ... } fn fill_contains_point(
&self,
point: Point2F,
world_transform: Option<&Matrix3x2F>
) -> Result<bool, D2D1Error> { ... } fn compare_with_geometry<T: Geometry>(
&self,
input: &T,
input_transform: Option<&Matrix3x2F>
) -> Result<GeometryRelation, D2D1Error> { ... } fn compute_area(
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<f32, D2D1Error> { ... } fn compute_length(
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<f32, D2D1Error> { ... } fn compute_point_at_length(
&self,
length: f32,
world_transform: Option<&Matrix3x2F>
) -> Result<(Point2F, Vector2F), D2D1Error> { ... } fn transformed(
&self,
transform: &Matrix3x2F
) -> Result<Transformed, D2D1Error> { ... } }
Required Methods
unsafe fn get_ptr(&self) -> *mut ID2D1Geometry
Provided Methods
fn get_factory(&self) -> Factory
fn to_generic(&self) -> GenericGeometry
fn get_bounds(
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<RectF, D2D1Error>
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<RectF, D2D1Error>
Retrieve the bounds of the geometry, with an optional applied transform.
NOTE: I'm not sure if this will ever return None, but the API has an error code so it could. The MSDN documentation is very vague on this.
fn get_widened_bounds(
&self,
stroke_width: f32,
stroke_style: Option<&StrokeStyle>,
world_transform: Option<&Matrix3x2F>
) -> Result<RectF, D2D1Error>
&self,
stroke_width: f32,
stroke_style: Option<&StrokeStyle>,
world_transform: Option<&Matrix3x2F>
) -> Result<RectF, D2D1Error>
Get the bounds of the corresponding geometry after it has been widened or have an optional pen style applied.
fn stroke_contains_point(
&self,
point: Point2F,
stroke_width: f32,
stroke_style: Option<&StrokeStyle>,
world_transform: Option<&Matrix3x2F>
) -> Result<bool, D2D1Error>
&self,
point: Point2F,
stroke_width: f32,
stroke_style: Option<&StrokeStyle>,
world_transform: Option<&Matrix3x2F>
) -> Result<bool, D2D1Error>
Checks to see whether the corresponding penned and widened geometry contains the given point.
fn fill_contains_point(
&self,
point: Point2F,
world_transform: Option<&Matrix3x2F>
) -> Result<bool, D2D1Error>
&self,
point: Point2F,
world_transform: Option<&Matrix3x2F>
) -> Result<bool, D2D1Error>
Test whether the given fill of this geometry would contain this point.
fn compare_with_geometry<T: Geometry>(
&self,
input: &T,
input_transform: Option<&Matrix3x2F>
) -> Result<GeometryRelation, D2D1Error>
&self,
input: &T,
input_transform: Option<&Matrix3x2F>
) -> Result<GeometryRelation, D2D1Error>
Compare how one geometry intersects or contains another geometry.
fn compute_area(
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<f32, D2D1Error>
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<f32, D2D1Error>
Computes the area of the geometry.
fn compute_length(
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<f32, D2D1Error>
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<f32, D2D1Error>
Computes the length of the geometry.
fn compute_point_at_length(
&self,
length: f32,
world_transform: Option<&Matrix3x2F>
) -> Result<(Point2F, Vector2F), D2D1Error>
&self,
length: f32,
world_transform: Option<&Matrix3x2F>
) -> Result<(Point2F, Vector2F), D2D1Error>
Computes the point and tangent at a given distance along the path.
fn transformed(&self, transform: &Matrix3x2F) -> Result<Transformed, D2D1Error>
Implementations on Foreign Types
impl<'a, T: Geometry> Geometry for &'a T
[src]
unsafe fn get_ptr(&self) -> *mut ID2D1Geometry
[src]
fn get_factory(&self) -> Factory
[src]
fn to_generic(&self) -> GenericGeometry
[src]
fn get_bounds(
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<RectF, D2D1Error>
[src]
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<RectF, D2D1Error>
fn get_widened_bounds(
&self,
stroke_width: f32,
stroke_style: Option<&StrokeStyle>,
world_transform: Option<&Matrix3x2F>
) -> Result<RectF, D2D1Error>
[src]
&self,
stroke_width: f32,
stroke_style: Option<&StrokeStyle>,
world_transform: Option<&Matrix3x2F>
) -> Result<RectF, D2D1Error>
fn stroke_contains_point(
&self,
point: Point2F,
stroke_width: f32,
stroke_style: Option<&StrokeStyle>,
world_transform: Option<&Matrix3x2F>
) -> Result<bool, D2D1Error>
[src]
&self,
point: Point2F,
stroke_width: f32,
stroke_style: Option<&StrokeStyle>,
world_transform: Option<&Matrix3x2F>
) -> Result<bool, D2D1Error>
fn fill_contains_point(
&self,
point: Point2F,
world_transform: Option<&Matrix3x2F>
) -> Result<bool, D2D1Error>
[src]
&self,
point: Point2F,
world_transform: Option<&Matrix3x2F>
) -> Result<bool, D2D1Error>
fn compare_with_geometry<T: Geometry>(
&self,
input: &T,
input_transform: Option<&Matrix3x2F>
) -> Result<GeometryRelation, D2D1Error>
[src]
&self,
input: &T,
input_transform: Option<&Matrix3x2F>
) -> Result<GeometryRelation, D2D1Error>
fn compute_area(
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<f32, D2D1Error>
[src]
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<f32, D2D1Error>
fn compute_length(
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<f32, D2D1Error>
[src]
&self,
world_transform: Option<&Matrix3x2F>
) -> Result<f32, D2D1Error>
fn compute_point_at_length(
&self,
length: f32,
world_transform: Option<&Matrix3x2F>
) -> Result<(Point2F, Vector2F), D2D1Error>
[src]
&self,
length: f32,
world_transform: Option<&Matrix3x2F>
) -> Result<(Point2F, Vector2F), D2D1Error>
fn transformed(&self, transform: &Matrix3x2F) -> Result<Transformed, D2D1Error>
[src]
Implementors
impl Geometry for GenericGeometry
impl Geometry for Rectangle
impl Geometry for RoundedRectangle
impl Geometry for Ellipse
impl Geometry for Group
impl Geometry for Transformed
impl Geometry for Path