mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
common: fix trimming
By mistake > was used instead of >=. The issue was observed for trim when the trim length was exactly zero.
This commit is contained in:
parent
7c87d8e632
commit
21a21a63ab
1 changed files with 2 additions and 2 deletions
|
@ -159,7 +159,7 @@ struct RenderStroke
|
|||
begin = trim.begin;
|
||||
end = trim.end;
|
||||
|
||||
if (fabsf(end - begin) > 1.0f) {
|
||||
if (fabsf(end - begin) >= 1.0f) {
|
||||
begin = 0.0f;
|
||||
end = 1.0f;
|
||||
return false;
|
||||
|
@ -224,7 +224,7 @@ struct RenderShape
|
|||
{
|
||||
if (!stroke) return false;
|
||||
if (stroke->trim.begin == 0.0f && stroke->trim.end == 1.0f) return false;
|
||||
if (fabsf(stroke->trim.end - stroke->trim.begin) > 1.0f) return false;
|
||||
if (fabsf(stroke->trim.end - stroke->trim.begin) >= 1.0f) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue