[][src]Struct world_image_file::WorldFile

pub struct WorldFile {
    pub x_scale: f64,
    pub y_scale: f64,
    pub x_skew: f64,
    pub y_skew: f64,
    pub x_coord: f64,
    pub y_coord: f64,
}

A World File

See the module top level documention

Fields

x_scale: f64y_scale: f64x_skew: f64y_skew: f64x_coord: f64y_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

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]