We have an image editor in Flex to add text and other changes. Once all the changes are complete, we need to save this to the server.
We are using php to save the images by accepting coordinates from flex about what all edits are made for that image. Using this we are editing that image using imagick function in PHP. But the problem is output is different from what we see in flex. The issue is mainly with text alignment in flex editor and in the output we get after editing in php.
Is there any other way to do this without making the user to wait for a long time to save the images?
or
Is it possible to get the correct coordinates of text from that flex editor. Our issue is flex is passing the x,y of the container of that text editor. For this reason, test is misaligned in the output.
Thanks in advance
What you want to do is use the TextLineMetrics.
You can get this information by using the getLineMetrics() Function.
Take a look at those links and if you still have some questions let me know and I’ll try to help you figure them out. But basically you can get the line metrics of the textfield and then send that information to the php instead of just the containers position. You will need to do this for each line in the textfield. The
TextLineMetricswill help you with positioning and sizing of the text to make sure you can line it up correctly.