Basically, stroke width size is linear,
engine couldn't apply scale factor from the matrix which contains 2 dimensional values.
Thus, we can apply it if the scale factor of x/y is identical.
Otherwise, we should transform every stroke points in the stroking process.
That scenario can be improved with another patch.
Change-Id: I070dcf29d2e42f21e182bdf4239781464158ef73
sw_engine simulates floating point by integer bit shifting,
it loses the accuracy while converting the number data.
This occurs the inacculated curve points result if it scales up very large size.
So we transform points before converting data in order to avoid losing the numbers less decimal point.
Change-Id: I0172e83f06b1a19143a2f65f667dc193e9a4396a
we don't need to apply anti-aliasing if stroke is there.
here turns off anti-alias if stroke width is more than 2.
magic number 2 is experimentally confirmed.
Change-Id: I09031dc2a0a84f31c5904651ed1e62004645ba9a
this matrix data is volatile since it's coming from stack memory.
thus engine should record its own memory space for keeping it.
Change-Id: I664dd56412f4d236ad04c312220c67da226274e5
memset() is more than 10x faster than manual loop.
Thus we replace it to manipulate buffer pixels.
Change-Id: If0f255578f7d49ff6704c4f15e2eefe435cc3c15
replace dynamic_cast to static_cast,
This can be a controversial choice between optmization and clean code.
Obviously we know the converting types,
try avoiding a bit heavier casting some cases.
Change-Id: Id763e6d1db449a229a492ab5b1a901a195936152
We prefer to build up a tiny compact engine at memory rather than compatibility,
this engine is not considerd for end-users but designed for middle-level framework
and some low-level users.
Thus, we won't consider 64bits data size,
use explicit 32 bits data until coming next upgrade...
Change-Id: I0704d5f1e0eb909cccc10922bc5972e115fbbcc0
Introduce Result type for notifying caller more detailed info.
We should implement the result values for each apis, with practical values.
Change-Id: Ia47abcb56a8efca7094ac3eed0178aeac8aa2910
also updated transform test cases.
Yet, this engine is not well optimized,
If they are too mch sluggish,
you can use ELM_FPS envrionment lowing down the fps
when you launch test cases...
ex) $ELM_FPS=30 ./testSceneTransform
Change-Id: I1871d5bedee010d5d6a3d877d95e257120796e8b
Each scene could conserve its own transformation,
the origin could be the parent Paint (if they were beloned to)
Thus, you can compose the multi-tranformed scene group which
simultenoulsly working in own spaces.
See testTransform and testSceneTransform, how they work.
Change-Id: I51deb4d66f8fcd024f8dc7a1e1af57c398a9d7fe
Paint supports translate, rotate, scale functions for transformation
The origin of these transformation is center of the paint,
thus you have to consider the center-aligned vertices if you'd like to use
these transformation functions.
This policy has been considered for scene transformation.
Change-Id: I78b63d7965faec0ec5b9a98a7776993744534b54
Come to think of it, this optimized method is not so useful,
it could just bring the user misunderstanding and
not to efficient as I expected in the most cases.
So, changed policy for transformation behaviors.
it keeps the properties as others but leaves it to the backend implementation.
Plus, this change contains the correct RenderUpdateFlag.
You can refer the flag in the backend to figure out which kinds of properites has been updated
Change-Id: Ibe0494712598a8161950b9ae2e22ac45bed1c47b
PaintNode -> Paint
ShapeNode -> Shape
SceneNode -> Scene
We can keep clean and neat shorter names.
Change-Id: Ic8521d456d947985e5fbe1ba2bde06faa1f52469