Andy Maloney
1bd4c59c0d
Remove extraneous namespace in test container
2024-08-19 16:41:50 +03:00
Andy Maloney
577367ecc9
Use one callback with enum to avoid extra API ( #2 )
2024-08-19 16:41:50 +03:00
Andy Maloney
1a54872a46
Add callbacks for mouse entering/leaving elements ( #1 )
...
Useful for showing URLs from anchors or for debugging.
2024-08-19 16:41:50 +03:00
stasoid
27696b8d8e
test_container: correctly draw multicolor borders
2024-05-20 00:40:31 +03:00
stasoid
863d6fe713
remove outdated comment
2024-05-20 00:40:31 +03:00
stasoid
41d9de3a25
test_container: update readme.txt
2024-05-20 00:40:31 +03:00
stasoid
def2684c1b
fix VS warning
2024-05-20 00:40:31 +03:00
stasoid
28bbe74ec9
test_container: support TTF fonts
2024-05-20 00:40:31 +03:00
stasoid
d5426075fa
canvas_ity: add get_font_metrics()
2024-05-20 00:40:31 +03:00
stasoid
138f712eb8
canvas_ity: fix font baseline position computation
2024-05-20 00:40:31 +03:00
stasoid
218eb74ae8
make m and w more bold in terminus-16px-bold.yaff
...
They didn't look bold enough. There is no space, so I made m/w wider. This makes terminus-16px-bold.yaff a variable-width font, which may be confusing because normal weight variant is monospace. I also used this variable-width opportunity to improve NMW glyphs.
Rendering of css-box-justify-content.htm changed because width of nbsp is computed correctly now.
2024-05-20 00:40:31 +03:00
stasoid
6c4e6ef10a
test_container: add terminus-16px-bold.yaff
2024-05-20 00:40:31 +03:00
stasoid
8d16a94e32
test_container: support list-style-image
2024-05-16 22:54:49 +03:00
stasoid
30e4fd105c
test_container: support list-style-type disc and circle
2024-05-16 22:54:49 +03:00
stasoid
7b7d292b58
fix gcc warning
2024-05-16 22:54:49 +03:00
stasoid
38180d37da
fix VS and gcc warnings
2024-05-16 22:54:49 +03:00
stasoid
08c647aea1
simplify things by making background_layer::color_point::offset and hint to always be between 0 and 1, even for conic gradients (so offset and hint for conic gradients are measured in turns instead of degrees now)
2024-05-16 22:54:49 +03:00
stasoid
60bd9f18f1
implement gradient color transition hints
2024-05-16 22:54:49 +03:00
stasoid
d3092ca1a8
test_container: fix gradient position
2024-05-16 22:54:49 +03:00
stasoid
423bb82412
canvas_ity: handle zero radius of radial gradient
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
869a3cd8ea
test_container, canvas_ity: implement conic-gradient
2024-05-16 22:54:49 +03:00
stasoid
70fafc0b86
test_container, canvas_ity: implement radial-gradient
...
Radial gradient supported by canvas_ity is different (two circles vs one ellipse in CSS), so I implemented new brush type, css_radial. It is created with canvas::set_css_radial_gradient().
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:

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
55e9fef61c
test_container: support linear-gradient (no-repeat only)
2024-05-16 22:54:49 +03:00
stasoid
725c4bcbc8
test_container: support image scaling
2024-05-16 22:54:49 +03:00
stasoid
0a07f85f81
test_container: simplify draw_borders
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
430d5a127f
render_test: add ability to run standalone (without gtest)
2024-05-11 13:21:22 +03:00
stasoid
e207a989f9
add media query tests, fix @media not unknown
2024-05-04 23:31:55 +03:00
stasoid
99dd1ffec7
test_container: support images
2024-05-04 23:31:55 +03:00
stasoid
78ad19a0fd
test_container: support nbsp
2024-05-04 23:31:55 +03:00
stasoid
0137aa400a
fix @import
2024-04-22 00:11:45 +03:00
stasoid
1f812472a2
fix clang warnings
2024-04-11 13:27:30 +05: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
Yuri Kobets
d4453f5d4e
Refactoring for zero warnings
...
Added compiler options: -Werror -Wall -Wextra -Wpedantic
2024-02-01 01:32:13 +03:00
Yuri Kobets
709855c1dc
fix test container base path
2023-12-21 23:53:36 +03:00
Yuri Kobets
3b896beede
changed signature of document_container::set_clip
...
Removed arguments valid_x and valid_y because they are always true
2023-05-12 18:13:13 +03:00
stasoid
19095e184e
test_container: update for API change
2023-02-25 11:19:59 +06:00
stasoid
65645f9ac4
test_container: add more font sizes
2023-02-18 07:37:53 +06:00
stasoid
fd8f7e9fee
test_container: update fonts/readme.txt
2022-12-12 13:04:02 +06: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
fcd32a9b7f
test_container: implement import_css
2022-12-12 06:03:29 +06:00
stasoid
522524220f
test_container: update fonts/readme.txt
2022-12-11 15:29:02 +06:00
stasoid
e8c0e3627a
readfile: C -> C++
2022-12-11 08:31:20 +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
stasoid
6ff77337fd
remove tests that don't test anything
2022-11-27 13:26:56 +06:00