[−][src]Struct world_image_file::WorldFile
A World File
See the module top level documention
Fields
x_scale: f64
y_scale: f64
x_skew: f64
y_skew: f64
x_coord: f64
y_coord: f64
Methods
impl WorldFile
[src]
pub fn from_path(p: impl AsRef<Path>) -> Result<Self, ()>
[src]
Open a world file from a path
pub fn from_reader(r: impl Read) -> Result<Self, ()>
[src]
Open a world file from something that can Read
pub fn from_string(s: impl AsRef<str>) -> Result<Self, ()>
[src]
Open a world file from a raw string file content
pub fn to_string(&self) -> String
[src]
Convert this world file to a raw string
pub fn write_to_writer(&self, w: impl Write)
[src]
Write this world file to this Write
object
pub fn write_to_path(&self, p: impl AsRef<Path>)
[src]
Write this world file to a path
pub fn image_to_world(&self, image_x_y: impl Into<(f64, f64)>) -> (f64, f64)
[src]
Convert image coordinates to world coordinates.
pub fn world_to_image(&self, world_x_y: impl Into<(f64, f64)>) -> (f64, f64)
[src]
Convert world coordinates to image coordinates
Trait Implementations
impl PartialEq<WorldFile> for WorldFile
[src]
impl Display for WorldFile
[src]
impl Debug for WorldFile
[src]
Auto Trait Implementations
impl Unpin for WorldFile
impl Sync for WorldFile
impl Send for WorldFile
impl RefUnwindSafe for WorldFile
impl UnwindSafe for WorldFile
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,