pub struct HtmlRenderer {
pub show_paragraph_marks: bool,
pub show_control_codes: bool,
/* private fields */
}Expand description
HTML 렌더러
Fields§
§show_paragraph_marks: bool문단부호(¶) 표시 여부
show_control_codes: bool조판부호 표시 여부
Implementations§
Source§impl HtmlRenderer
impl HtmlRenderer
pub fn new() -> Self
Sourcepub fn render_tree(&mut self, tree: &PageRenderTree)
pub fn render_tree(&mut self, tree: &PageRenderTree)
렌더 트리를 HTML로 렌더링
Trait Implementations§
Source§impl Renderer for HtmlRenderer
impl Renderer for HtmlRenderer
Source§fn begin_page(&mut self, width: f64, height: f64)
fn begin_page(&mut self, width: f64, height: f64)
페이지 렌더링 시작
Source§fn draw_text_positioned(
&mut self,
text: &str,
x: f64,
y: f64,
style: &TextStyle,
layout_positions: Option<&[f64]>,
)
fn draw_text_positioned( &mut self, text: &str, x: f64, y: f64, style: &TextStyle, layout_positions: Option<&[f64]>, )
Layout owner가 확정한 run-relative 문자 경계값으로 텍스트를 그린다. Read more
Source§fn draw_rect(
&mut self,
x: f64,
y: f64,
w: f64,
h: f64,
corner_radius: f64,
style: &ShapeStyle,
)
fn draw_rect( &mut self, x: f64, y: f64, w: f64, h: f64, corner_radius: f64, style: &ShapeStyle, )
사각형 그리기 (corner_radius > 0이면 둥근 모서리)
Source§fn draw_ellipse(
&mut self,
cx: f64,
cy: f64,
rx: f64,
ry: f64,
style: &ShapeStyle,
)
fn draw_ellipse( &mut self, cx: f64, cy: f64, rx: f64, ry: f64, style: &ShapeStyle, )
타원 그리기
Source§fn draw_path(&mut self, commands: &[PathCommand], style: &ShapeStyle)
fn draw_path(&mut self, commands: &[PathCommand], style: &ShapeStyle)
패스 그리기 (벡터 도형)
Auto Trait Implementations§
impl Forget for HtmlRenderer
impl Freeze for HtmlRenderer
impl Move for HtmlRenderer
impl RefUnwindSafe for HtmlRenderer
impl Send for HtmlRenderer
impl Sync for HtmlRenderer
impl Unpin for HtmlRenderer
impl UnsafeUnpin for HtmlRenderer
impl UnwindSafe for HtmlRenderer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.