Commit Graph

11 Commits

Author SHA1 Message Date
stasoid
38180d37da fix VS and gcc warnings 2024-05-16 22:54:49 +03:00
stasoid
62de3475f3 test_container: add ability to use background repeat styles with gradient images 2024-05-16 22:54:49 +03:00
stasoid
eadeeefbd9 test_container, canvas_ity: do not linearize colors to match Chrome/Firefox gradient rendering
Old behavior is still available with #define CANVAS_ITY_IMPLEMENTATION LINEARIZE_RGB

Comparison of rendering linear-gradient-1.htm with and without LINEARIZE_RGB:
![image](https://github.com/stasoid/test/assets/2577509/074f2593-1beb-49f6-a387-370a8dfedaad)

Browsers don't render gradients identically, so I use max_color_diff() to compare them.
It measures max difference in each RGBA component in each pixel.
                                                 max_color_diff
chrome vs firefox                                1
chrome vs canvas_ity without linearized colors   1
chrome vs canvas_ity with linearized colors      74
2024-05-16 22:54:49 +03:00
stasoid
7b0d9e33a5 test_container: remove unused code 2024-05-16 22:54:49 +03:00
stasoid
44ac33f825 test_container: convert to using canvas_ity 2024-05-16 22:54:49 +03:00
stasoid
99dd1ffec7 test_container: support images 2024-05-04 23:31:55 +03:00
stasoid
3226d74add Add standard-compliant css parser 2024-04-09 10:12:46 +05:00
Matthew Allen
e8788a97ef Fix windows build issues. 2024-02-19 21:41:56 +11:00
stasoid
3ee3977bce test_container: implement draw_list_marker (only square bullets) 2022-12-12 07:31:26 +06:00
stasoid
4f92aa42f0 test_container: implement draw_background
only color, no images
only 2 values of opacity are supported:
   color.alpha == 0  fully transparent
   color.alpha != 0  fully opaque
2022-12-12 06:31:35 +06:00
stasoid
778a6e2c63 Add render tests
Render tests are .htm files in litehtml/test directory.
Tests starting with "-" are disabled.

Correct rendering is in corresponding .htm.png file.
To generate .png file, run ctest from litehtml/build. The test will fail
and create xxx.htm-FAILED.png file. Rename it to xxx.htm.png

One ASCII raster font with 3 sizes is supported, see litehtml/containers/test/fonts. This should be enough for tests.
Border painting is supported, only solid borders.
Backgrounds, images and list markers are not supported.
2022-12-11 04:20:48 +06:00