Skip to main content

PageSetup

Struct PageSetup 

Source
pub struct PageSetup {
Show 14 fields pub canvas_mm: [f64; 2], pub resolution: f64, pub trim_mm: [f64; 2], pub bleed_mm: f64, pub basic_mm: [f64; 2], pub basic_offset_mm: [f64; 2], pub right_binding: bool, pub first_page_left: bool, pub title: String, pub story_index: Option<i64>, pub author: String, pub nombre_start: i64, pub font: Option<StoryFont>, pub story: StoryLayout,
}
Expand description

What a page and its work are made with. Lengths in mm.

Fields§

§canvas_mm: [f64; 2]

キャンバス (用紙) size.

§resolution: f64

解像度 (dpi).

§trim_mm: [f64; 2]

仕上がり (製本) size.

§bleed_mm: f64

裁ち落とし幅.

§basic_mm: [f64; 2]

基本枠 size and its offset from the middle of the canvas.

§basic_offset_mm: [f64; 2]

Offset of the 基本枠 from the middle of the canvas (x, y).

§right_binding: bool

右綴じ (a manga) rather than 左綴じ.

§first_page_left: bool

Whether the book’s first page (index 0) is a left page.

§title: String

作品名.

§story_index: Option<i64>

話数; none leaves it out of the 作品情報.

§author: String

作者名.

§nombre_start: i64

ノンブルの開始番号.

§font: Option<StoryFont>

None keeps the built-in one (MS ゴシック).

§story: StoryLayout

サブタイトル, where the 作品情報 go, ページ番号 and a shown ノンブル.

Implementations§

Source§

impl PageSetup

Source

pub fn check(&self) -> Result<()>

Whether the values make a page CSP opens (sizes, frames inside the canvas, resolution 72–1200 dpi). Messages for people (and checks of what a person may type) are the application’s.

Source

pub fn canvas_px(&self) -> (i64, i64)

Canvas size in pixels.

Source

pub fn story_line(&self) -> String

The 作品情報 line: 作品名, 話数 and サブタイトル as CSP writes them.

Trait Implementations§

Source§

impl Clone for PageSetup

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PageSetup

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PageSetup

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for PageSetup

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for PageSetup

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PageSetup

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.