LsmDomView

## LsmDomView LsmDomView — Base class for DOM views |

## Synopsis

    #define             LSM_DOM_VIEW_DEFAULT_RESOLUTION
    #define             LSM_DOM_VIEW_DEFAULT_VIEWBOX_HEIGHT
    #define             LSM_DOM_VIEW_DEFAULT_VIEWBOX_WIDTH
                        LsmDomView;
    double              lsm_dom_view_get_resolution         (LsmDomView *self);
    LsmBox              lsm_dom_view_get_viewport           (LsmDomView *self);
    LsmBox              lsm_dom_view_get_viewport_pixels    (LsmDomView *self);
    void                lsm_dom_view_set_resolution         (LsmDomView *self,
                                                             double ppi);
    void                lsm_dom_view_set_viewport           (LsmDomView *self,
                                                             const LsmBox *viewport_pt);
    void                lsm_dom_view_set_viewport_pixels    (LsmDomView *self,
                                                             const LsmBox *viewport);
    void                lsm_dom_view_render                 (LsmDomView *view,
                                                             cairo_t *cairo,
                                                             double x,
                                                             double y);
    void                lsm_dom_view_get_size               (LsmDomView *view,
                                                             double *width,
                                                             double *height,
                                                             double *baseline);
    void                lsm_dom_view_get_size_pixels        (LsmDomView *view,
                                                             unsigned int *width,
                                                             unsigned int *height,
                                                             unsigned int *baseline);
    void                lsm_dom_view_set_debug              (LsmDomView *view,
                                                             const char *feature,
                                                             gboolean enable);

## Object Hierarchy

      GObject
       +----LsmDomView

## Description

## Details

### LSM_DOM_VIEW_DEFAULT_RESOLUTION

    #define LSM_DOM_VIEW_DEFAULT_RESOLUTION 	 72.0

### LSM_DOM_VIEW_DEFAULT_VIEWBOX_HEIGHT

    #define LSM_DOM_VIEW_DEFAULT_VIEWBOX_HEIGHT 	200.0

### LSM_DOM_VIEW_DEFAULT_VIEWBOX_WIDTH

    #define LSM_DOM_VIEW_DEFAULT_VIEWBOX_WIDTH 320.0

### LsmDomView

    typedef struct _LsmDomView LsmDomView;

### lsm_dom_view_get_resolution ()

    double              lsm_dom_view_get_resolution         (LsmDomView *self);

`self` : | A LsmDomView
Returns : | view resolution, in pixel per inch.

### lsm_dom_view_get_viewport ()

    LsmBox              lsm_dom_view_get_viewport           (LsmDomView *self);

`self` : | a LsmDomView
Returns : | viewport size, in points.

### lsm_dom_view_get_viewport_pixels ()

    LsmBox              lsm_dom_view_get_viewport_pixels    (LsmDomView *self);

`self` : | a LsmDomView
Returns : | viewport size, in pixels.

### lsm_dom_view_set_resolution ()

    void                lsm_dom_view_set_resolution         (LsmDomView *self,
                                                             double ppi);

Set the view resolution, in pixel per inch.

`self` : | a LsmDomView
`ppi` : | resolution, in pixel per inch.

### lsm_dom_view_set_viewport ()

    void                lsm_dom_view_set_viewport           (LsmDomView *self,
                                                             const LsmBox *viewport_pt);

Set the viewport size.

`self` : | a LsmDomView
`viewport_pt` : | viewport size, in points

### lsm_dom_view_set_viewport_pixels ()

    void                lsm_dom_view_set_viewport_pixels    (LsmDomView *self,
                                                             const LsmBox *viewport);

Set the viewport size.

`self` : | a LsmDomView
`viewport` : | viewport size, in pixels

### lsm_dom_view_render ()

    void                lsm_dom_view_render                 (LsmDomView *view,
                                                             cairo_t *cairo,
                                                             double x,
                                                             double y);

Render `view` in the `cairo` context.

`view` : | a LsmDomView
`cairo` : | cairo context
`x` : | x posiiton for rendering
`y` : | y position for rendering

### lsm_dom_view_get_size ()

    void                lsm_dom_view_get_size               (LsmDomView *view,
                                                             double *width,
                                                             double *height,
                                                             double *baseline);

Get the view size and baseline. Baseline is for use of view inside bloc of text.

`view` : | a LsmDomView
`width` : | view width placeholder, in points
`height` : | view height placeholder, in points
`baseline` : | view baseline, in points

### lsm_dom_view_get_size_pixels ()

    void                lsm_dom_view_get_size_pixels        (LsmDomView *view,
                                                             unsigned int *width,
                                                             unsigned int *height,
                                                             unsigned int *baseline);

Get the view size and baseline. Baseline is for use of view inside bloc of text.

`view` : | a LsmDomView
`width` : | view width placeholder, in pixels
`height` : | view height placeholder, in pixels
`baseline` : | view baseline, in pixels

### lsm_dom_view_set_debug ()

    void                lsm_dom_view_set_debug              (LsmDomView *view,
                                                             const char *feature,
                                                             gboolean enable);

Configure feature debug.

`view` : | a LsmDomView
`feature` : | name of the feature to debug
`enable` : | wether to enable debugging