Graphics

Answered

The circle is out of position

"type": "Diagram", "elements": [ { "type": "Node", "kind": "circle", "id": 8, "cx": 194.01273, "cy": 110.98675, "r": 24.512451 } ], "version": "2", "id": "MainBlock" } this.exportParams = inkEditor.getEngine().createParameterSet(); this.exportParams.setBoolean("export.jiix.strokes", false); this.exportParams.setBoolean("export.jiix.bounding-box", false); this.exportParams.setBoolean("export.jiix.glyphs", false); this.exportParams.setBoolean("export.jiix.primitives", false); this.exportParams.setBoolean("export.jiix.chars", false);

Best Answer

Dear Gang Chen,


currently, did you proceed as indicated in the other topic, i.e. NOT use the invert to convert to screen pixels? Is it working?


Also, can you confirm there is no offset on your screen that would shift the position of the circle when re-drawing it?


If this doesn't help, can you please provide us with the following:

-The strokes of your circle (x and y coordinates) you get from screen

-The x and y resolution you provide to your renderer when creating it

-Your JIIX file before calling the "convert" function

-Your JIIX file after calling the convert function

-The coordinates you are setting to re-draw your circle.


Also, how are you getting the coordinates of your circle? Are you parsing the JIIX file? Before or after calling the convert? Then, you apply to transform to convert these to your screen coordinates? Is if possible to have the source code where you get the coordinates and convert these with the transform?


Best regards,


Olivier

1 Comment

Answer

Dear Gang Chen,


currently, did you proceed as indicated in the other topic, i.e. NOT use the invert to convert to screen pixels? Is it working?


Also, can you confirm there is no offset on your screen that would shift the position of the circle when re-drawing it?


If this doesn't help, can you please provide us with the following:

-The strokes of your circle (x and y coordinates) you get from screen

-The x and y resolution you provide to your renderer when creating it

-Your JIIX file before calling the "convert" function

-Your JIIX file after calling the convert function

-The coordinates you are setting to re-draw your circle.


Also, how are you getting the coordinates of your circle? Are you parsing the JIIX file? Before or after calling the convert? Then, you apply to transform to convert these to your screen coordinates? Is if possible to have the source code where you get the coordinates and convert these with the transform?


Best regards,


Olivier