Skip to content

background_paint

Yuri Kobets edited this page May 22, 2023 · 5 revisions

litehtml::background_paint

litehtml::background_paint class is used in document_container::draw_background function.

Data members

image

std::string image;

The image contains the background image URL. URL can be relative. Use the baseurl member to find the base URL for image.

baseurl

std::string baseurl;

The base URL for image. Use the document base URL if this baseurl is empty.

attachment

background_attachment attachment;

This is the background-attachment CSS property. Can be one of the following values:

  • background_attachment_scroll - CSS scroll
  • background_attachment_fixed - - CSS fixed

repeat

background_repeat repeat;

This the background-repeat CSS property. Can be one of the following values:

  • background_repeat_repeat - CSS repeat
  • background_repeat_repeat_x - CSS repeat-x
  • background_repeat_repeat_y - CSS repeat-y
  • background_repeat_no_repeat - CSS no-repeat

color

web_color color;

This member defines the background-color CSS property.

clip_box

position clip_box;

Defines the position of the clipping box. See the background-clip CSS property.

origin_box

position origin_box;

Defines the position of the origin box. See the background-origin CSS property.

border_box

position border_box;

Defines the position of the border box.

border_radius

border_radiuses border_radius;

Defines the border radiuses. See the border-radius CSS property. The border_radiuses contains the vertical and horizontal values for every corner.

image_size

size image_size;

The size of the image. See the background-size CSS property.

position_x and position_y

int position_x;
int position_y;

The horizontal and vertical position of the background image. See the background-position CSS property. Note the position is calculated already.

is_root

bool is_root;

is_root is true for the root item (<body>) so you have to apply the background to entire client area/window.

Clone this wiki locally