Page MenuHomePhabricator

Efl.Ui.Textpath: fix a size problem

Authored by kimcinoo on May 21 2019, 5:47 AM.



Textpath set its hint_size using its position and calulated path information.
The path information is calculated using center postion, radius & start angle.
For example, if textpath position is 0,0 and center positon of path is 100,100
and radius 50, then text will be located on the rigth side of textpath object.

Moreover there is another problem.

[Step to reproduce]

  1. Launch elementary_test
  2. open Efl.Ui.Textpath
  3. see circle is not center aligned.
  4. click Clockwise 1 ~ 2 times center position is changed repeatedly.

This occurs because textpath size is calculated by position_set.
It does not make sense that changing postion defines its size.

So this patch is setting textpath hint_size using only given center position.
The text will position on the middle of textpath object always.

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
kimcinoo created this revision.May 21 2019, 5:47 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added:

kimcinoo requested review of this revision.May 21 2019, 5:47 AM
Hermet requested changes to this revision.May 22 2019, 10:26 PM

Please check a comment.


What happens if circle_set doesn't used?
The better method for this issue is to update the bezier origin position whenever position is changed.


EINA_INLIST_FOREACH(pd->segments, seg)
   update  seg->bezier origin position.


This revision now requires changes to proceed.May 22 2019, 10:26 PM
kimcinoo updated this revision to Diff 22330.May 23 2019, 1:46 AM

Enhanced based on comment. This is much more neat!

Hermet accepted this revision.May 23 2019, 4:09 AM
This revision is now accepted and ready to land.May 23 2019, 4:09 AM
This revision was automatically updated to reflect the committed changes.