Struct libreda_db::layout::prelude::Rot90Transform
pub struct Rot90Transform {
angle: Angle,
}Expand description
Transformation that consists only of a rotation by a multiple of 90 degrees
around the origin (0, 0).
Fields§
§angle: AngleImplementations§
§impl Rot90Transform
impl Rot90Transform
pub fn new(angle: Angle) -> Rot90Transform
pub fn new(angle: Angle) -> Rot90Transform
Create a new rotation transformation.
pub fn is_unitary(&self) -> bool
pub fn is_unitary(&self) -> bool
This transformation is always unitary. Returns always true.
pub fn transform_point<T>(&self, p: Point<T>) -> Point<T>where
T: CoordinateType,
pub fn transform_point<T>(&self, p: Point<T>) -> Point<T>where T: CoordinateType,
Apply the transformation to a single point.
pub fn magnification<T>(&self) -> Twhere
T: CoordinateType,
pub fn magnification<T>(&self) -> Twhere T: CoordinateType,
Get the magnification of this transformation. Always 1.
pub fn try_magnification<T>(&self) -> Option<T>where
T: CoordinateType,
pub fn try_magnification<T>(&self) -> Option<T>where T: CoordinateType,
Get the magnification of this transformation. Always Some(1).
Trait Implementations§
§impl Clone for Rot90Transform
impl Clone for Rot90Transform
§fn clone(&self) -> Rot90Transform
fn clone(&self) -> Rot90Transform
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for Rot90Transform
impl Debug for Rot90Transform
§impl<'de> Deserialize<'de> for Rot90Transform
impl<'de> Deserialize<'de> for Rot90Transform
§fn deserialize<__D>(
__deserializer: __D
) -> Result<Rot90Transform, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Rot90Transform, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Hash for Rot90Transform
impl Hash for Rot90Transform
§impl PartialEq<Rot90Transform> for Rot90Transform
impl PartialEq<Rot90Transform> for Rot90Transform
§fn eq(&self, other: &Rot90Transform) -> bool
fn eq(&self, other: &Rot90Transform) -> bool
This method tests for
self and other values to be equal, and is used
by ==.§impl Serialize for Rot90Transform
impl Serialize for Rot90Transform
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more