ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Adding rotation and flipping
Posted by at on Apr-03-2018 13:39
Attachments:
Hi Peter,  I modified the code here and added a text on every square and then called hlip()/vflip() after rotate. How can I make it such that the text will always be readable i.e. will not be rotated and/or flipped?

Attached is the output image and the modified code.

Thanks.
wafer2.php
wafer2.php

4.73 Kb
    
wafer.png

  Re: Adding rotation and flipping
Posted by Peter Kwan on Apr-03-2018 20:15
Attachments:
Hi at,

You can draw the text after the rotation and flipping. In this way, the text will not be rotated or flipped and will always be upright. You can use simple coordinate transformation to determine the position of the text after rotation and flipping. I have attached an example for your reference.

For the flipping, you also need to "flip" the axis at the bottom-left corner and also the Javascript tooltips. So it is better to set a parameter for flipping (in the code, it is $hFlip) so all the code can flip at the same time.

Hope this can help.

Regards
Peter Kwan
wafer2.php
wafer2.php

5.38 Kb
    
wafer2.png

  Re: Adding rotation and flipping
Posted by at on Apr-04-2018 15:12
Thanks Peter, I was just hoping if there's an undocumented API to rotate and flip the text itself just to avoid looping again.