[][src]Struct rsvg_internals::handle::Handle

pub struct Handle {
    document: Document,
}

Main handle to an SVG document.

This is the main object in librsvg. It gets created with the from_stream method and then provides access to all the primitives needed to implement the public APIs.

Fields

document: Document

Methods

impl Handle[src]

pub fn from_stream(
    load_options: &LoadOptions,
    stream: &InputStream,
    cancellable: Option<&Cancellable>
) -> Result<Handle, LoadingError>
[src]

Loads an SVG document into a Handle.

pub fn has_sub(&self, id: &str) -> Result<bool, RenderingError>[src]

Queries whether a document has a certain element #foo.

The id must be an URL fragment identifier, i.e. something like #element_id.

fn get_node_geometry_with_viewport(
    &self,
    node: &Node<NodeData>,
    viewport: Rect,
    dpi: Dpi,
    is_testing: bool
) -> Result<(Rect, Rect), RenderingError>
[src]

Returns (ink_rect, logical_rect)

pub fn get_geometry_sub(
    &self,
    id: Option<&str>,
    dpi: Dpi,
    is_testing: bool
) -> Result<(Rect, Rect), RenderingError>
[src]

Returns (ink_rect, logical_rect)

fn get_node_or_root(
    &self,
    id: Option<&str>
) -> Result<Node<NodeData>, RenderingError>
[src]

pub fn get_geometry_for_layer(
    &self,
    id: Option<&str>,
    viewport: &Rectangle,
    dpi: Dpi,
    is_testing: bool
) -> Result<(Rectangle, Rectangle), RenderingError>
[src]

fn lookup_node(&self, id: &str) -> Result<Node<NodeData>, DefsLookupErrorKind>[src]

pub fn render_document(
    &self,
    cr: &Context,
    viewport: &Rectangle,
    dpi: Dpi,
    is_testing: bool
) -> Result<(), RenderingError>
[src]

pub fn render_layer(
    &self,
    cr: &Context,
    id: Option<&str>,
    viewport: &Rectangle,
    dpi: Dpi,
    is_testing: bool
) -> Result<(), RenderingError>
[src]

fn get_bbox_for_element(
    &self,
    node: &Node<NodeData>,
    dpi: Dpi,
    is_testing: bool
) -> Result<BoundingBox, RenderingError>
[src]

pub fn get_geometry_for_element(
    &self,
    id: Option<&str>,
    dpi: Dpi,
    is_testing: bool
) -> Result<(Rectangle, Rectangle), RenderingError>
[src]

Returns (ink_rect, logical_rect)

pub fn render_element(
    &self,
    cr: &Context,
    id: Option<&str>,
    element_viewport: &Rectangle,
    dpi: Dpi,
    is_testing: bool
) -> Result<(), RenderingError>
[src]

pub fn get_intrinsic_dimensions(&self) -> IntrinsicDimensions[src]

pub fn set_stylesheet(&mut self, css: &str) -> Result<(), LoadingError>[src]

Auto Trait Implementations

impl !RefUnwindSafe for Handle

impl !Send for Handle

impl !Sync for Handle

impl Unpin for Handle

impl !UnwindSafe for Handle

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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<V, T> VZip<V> for T where
    V: MultiLane<T>,