Hermet Park
84012651cc
common engine: code refactoring
...
Introduce the RenderMesh structure to reduce the number of required parameters.
2023-04-27 10:16:12 +09:00
Mira Grudzinska
f65d410b9f
sw_engine: fix safety check
...
An incorrect check introduced in bf07eb11f2
as a solution of the #1327 issue. As a consequence rotated images
were not drawn. Fixed.
2023-03-26 12:46:28 +09:00
Hermet Park
c9657e3e68
sw_engine - ++safety
...
Prevent any potential crash.
@Issues: https://github.com/thorvg/thorvg/issues/1327
2023-03-14 23:52:07 +09:00
Hermet Park
9b3c34c3b1
updated copyright.
2023-01-14 13:48:11 +09:00
Mira Grudzinska
1980d9d0e3
all: Trailing spaces removed
2023-01-07 10:53:51 +09:00
projectitis
3dd65dfed0
common picture: support image mesh feature
...
Tvg Picture newly provides mesh() api to support texture mapping.
These apis allows to have a coarse triangle list which have polygon coordinates
and texture uvs those are used for traditional polygon texture mapping.
Note that these apis are beta version.
@API Additions:
Result mesh(const Polygon* triangles, const uint32_t triangleCount) noexcept
uint32_t mesh(const Polygon** triangles) const noexcept
@Examples:
//Mapping with two polygons
Polygon polygon[2];
//First polygon
polygon[0].vertex[0].pt = {0, 0};
polygon[0].vertex[1].pt = {100, 0};
polygon[0].vertex[2].pt = {0, 100};
polygon[0].vertex[0].uv = {0, 0};
polygon[0].vertex[1].uv = {1, 0};
polygon[0].vertex[2].uv = {0, 1};
//Second polygon
polygon[1].vertex[0].pt = {100, 0};
polygon[1].vertex[1].pt = {100, 100};
polygon[1].vertex[2].pt = {0, 100};
polygon[1].vertex[0].uv = {1, 0};
polygon[1].vertex[1].uv = {1, 1};
polygon[1].vertex[2].uv = {0, 1};
//Apply polygons to the picture
picture->mesh(polygon, 2);
@Issues: https://github.com/Samsung/thorvg/issues/1218
2022-08-20 11:58:55 +09:00
Rémi Verschelde
46c3fc1f94
Format code files with dos2unix, ensure newline at EOF
2022-07-10 23:21:05 +09:00
Hermet Park
f0141e63de
updated copyright date.
2022-01-12 14:08:48 +09:00
Hermet Park
77d33b2d9f
sw_engine texmap: fix trivial compiler warnings.
...
warning: suggest braces around initialization of subobject [-Wmissing-braces]
2021-12-23 10:40:09 +09:00
Hermet Park
e258a2a662
sw_engine texmap: implemented fast span-edge anti-aliasing
...
This Anti-Aliasing mechanism is originated from Hermet Park's idea.
To understand this AA logic, you can refer this page:
www.hermet.pe.kr/122 (hermetpark@gmail.com )
@Issue: https://github.com/Samsung/thorvg/issues/161
2021-12-16 15:56:20 +09:00
Hermet Park
45132a7051
sw_engine raster: improve the transformed rle image rasterizer.
...
replace the transformed rle rgba image with the texmap raster.
this patch removes the several scattered transformed image rasterizer,
reuse the unified one texmap method instead.
yay, it's much clean and optimal.
2021-12-14 19:04:16 +09:00
Hermet Park
19aa102749
sw_engine raster: fix the texmap regression bug.
...
Wrong inline function with C-preprocessing doesn't work at all...
Correct them with including the separate files instead.
2021-11-26 17:41:33 +09:00
Hermet Park
eddaf615c3
sw_engine: code refactoring
...
unified the two color interpolate methods.
2021-11-25 20:04:37 +09:00
Hermet Park
2ca6f76d91
sw_engine texmap: code refactoring.
...
Unrolled the blending stages by applying macro magics.
I know this is a bit bad for code readibility
but good for the performance and the optimal LOC.
2021-11-25 18:51:04 +09:00
Hermet Park
aff755aeb5
sw_engine texmap: introduced texture mapping polygon drawing.
...
Introduced the texture-mapping algorithm for the image-scaler.
With this approach, we can support any arbitrary forms of the transformed shapes
while appling the scale factors - x/y separately.
Also this is more efficient when the transformed image is far from the rectangular form
because our current normal image rasterizer based on the given drawing region whereas
our new approach is span-based.
Thus, we applied this mechanism only for the transformed images.
2021-11-25 17:07:24 +09:00