mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-09 14:13:43 +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
d29a3d754b
commit
e21c225b7f
1 changed files with 2 additions and 2 deletions
|
@ -161,7 +161,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;
|
||||
|
@ -226,7 +226,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