Commit graph

18 commits

Author SHA1 Message Date
Mira Grudzinska
f0d8ab4274 utils: math functions moved from lib to utils 2023-08-05 11:49:36 +09:00
Hermet Park
d53d8d726f common bezier: enhancement to the common Bezier function
Add a method that returns the angle at position 't'.
also revise bezAt() method to allow optimal usages.
2023-07-25 19:57:12 +09:00
Hermet Park
d7058e41e4 common bezier: fix a regression bug.
revert issued code from def6393d82.
2023-07-12 20:50:58 +09:00
Hermet Park
def6393d82 common bezier: Add a function that returns the position.
A utility for common use of the Bezier curve.
2023-07-11 18:35:33 +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
Hermet Park
f0141e63de updated copyright date. 2022-01-12 14:08:48 +09:00
Mira Grudzinska
4589196689
common: preventing msvc compiler warnings (#817) 2021-09-20 13:54:06 +02:00
Michal Maciola
934a95777c
common: style fixes (#644) 2021-07-22 13:35:26 +02:00
Hermet Park
1a7d41ce71 updated copyright 2021-03-23 14:31:58 +09:00
Mira Grudzinska
380450c95b Bezier curve: introducing BEZIER_EPSILON
BEZIER_EPSILON is used instead of EPSILON_FLT, because its
value was to small causing in some cases an infinite loop.
2020-10-20 16:12:59 +09:00
Hermet Park
8422e8c62b common canvas: revise clear method.
Canvas::clear() introduces a new argument "free" that deterimes freeing the retained paints.

If free is true, Canvas won't delete the retained paints so that user keep paints valid.

In this scenario, user must have paints pointers, free them manually or push them again to the canvas.

This scenario is useful if user wants to re-organize paints order in the list or reuse them.
2020-10-08 12:07:27 +09:00
Hermet Park
c6b3f78eca common bezier: code refactoring.
use a zero ranged macro.
2020-10-07 14:33:17 +09:00
Mira Grudzinska
9cd4d2b363 Bezier curve: improvement of the curve splitting algorithm
bezAt() function needed to be fixed.
Also the convergence in the while loop was sped up and
the break condition was changed.
2020-10-01 03:09:36 +02:00
Hermet Park
6365d02a96 optimization: cut off file dependencies.
we should avoid code insertion during file dependencies,
such as #include "xxx.h" which has implementations.

This could increase binary size, we can avoid it as possible.

Current patch improves binary size like this:

From: file(2059008) = text(120360) data(8096) bss(80) dec(128536)
To  : file(1921832) = text(118429) data(7872) bss(56) dec(126357)

More additional patches will come in to optmize binary size.
2020-09-23 20:57:30 +09:00
Hermet Park
04c6295974 code refactoring
remove unnecessary condition.
implementation won't be included multiple times not like headers.

Thus this condition is unnecessary.

Change-Id: Id37e675c40ce7213a06c950da8e5ca17ff7245c9
2020-08-20 16:16:46 +09:00
Hermet Park
9893af979f replace license from Apache 2.0 to MIT
Change-Id: I61f7cb2b0e407bc035f3b2ec7da9b7f230057e24
2020-08-13 16:53:38 +09:00
Hermet Park
ab5c1bc441 common bezier: code refactoring.
Organize bezier functions for internal share.

this bezier can be used in svg loader.

Change-Id: I78acd3273c0528688ca46ff7c29d78607bd729bd
2020-06-22 17:07:53 +09:00