Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[23_27] Change std-arc to counterclockwise #1842

Merged
merged 4 commits into from
May 29, 2024

Conversation

Oyyko
Copy link
Contributor

@Oyyko Oyyko commented May 1, 2024

What

Change the arc direction of std-arc to counterclockwise

Why

It's more common for math workers.

How to test your changes?

Use mogan's arc drawing function

@Oyyko
Copy link
Contributor Author

Oyyko commented May 1, 2024

Maybe useful reference: #1038

@Oyyko Oyyko requested a review from da-liii May 2, 2024 04:36
@da-liii
Copy link
Contributor

da-liii commented May 2, 2024

Here is the test doc, with or without this pull request, the rendering of the arc is different. Please think about compatibility!

Must we break the compatibility?

<TeXmacs|2.1.2>

<style|<tuple|generic|no-page-numbers|chinese>>

<\body>
  <with|gr-mode|<tuple|edit|point>|gr-frame|<tuple|scale|1cm|<tuple|0.5gw|0.5gh>>|gr-geometry|<tuple|geometry|1par|0.6par>|gr-grid|<tuple|empty>|gr-edit-grid-aspect|<tuple|<tuple|axes|none>|<tuple|1|none>|<tuple|10|none>>|gr-edit-grid|<tuple|empty>|gr-arrow-end|\<gtr\>|gr-grid-old|<tuple|cartesian|<point|0|0>|2>|gr-edit-grid-old|<tuple|cartesian|<point|0|0>|1>|<graphics||<with|arrow-end|\<gtr\>|<std-arc|<point|0|0>|<point|0.0|2.0>|<point|2.0|0.0>>>>>
</body>

<\initial>
  <\collection>
    <associate|page-medium|paper>
    <associate|page-screen-margin|false>
  </collection>
</initial>

@Oyyko
Copy link
Contributor Author

Oyyko commented May 3, 2024

Here is the test doc, with or without this pull request, the rendering of the arc is different. Please think about compatibility!

Must we break the compatibility?

<TeXmacs|2.1.2>

<style|<tuple|generic|no-page-numbers|chinese>>

<\body>
  <with|gr-mode|<tuple|edit|point>|gr-frame|<tuple|scale|1cm|<tuple|0.5gw|0.5gh>>|gr-geometry|<tuple|geometry|1par|0.6par>|gr-grid|<tuple|empty>|gr-edit-grid-aspect|<tuple|<tuple|axes|none>|<tuple|1|none>|<tuple|10|none>>|gr-edit-grid|<tuple|empty>|gr-arrow-end|\<gtr\>|gr-grid-old|<tuple|cartesian|<point|0|0>|2>|gr-edit-grid-old|<tuple|cartesian|<point|0|0>|1>|<graphics||<with|arrow-end|\<gtr\>|<std-arc|<point|0|0>|<point|0.0|2.0>|<point|2.0|0.0>>>>>
</body>

<\initial>
  <\collection>
    <associate|page-medium|paper>
    <associate|page-screen-margin|false>
  </collection>
</initial>

One solution is to introduce a new data type, for example we can name it std2-arc. std-arc is clockwise, and std2-arc is counterclockwise. Then in the new version we can generate std2-arc by default when drawing an arc. This is a solution. I'm wondering if there is a better solution.

@Oyyko
Copy link
Contributor Author

Oyyko commented May 5, 2024

@da-liii I add a new type called std-arc-counterclockwise. And we will use this for drawing an arc by default in this PR. The old document with std-arc type can also be drawed correctly. So we maintained the compatibility.

@da-liii
Copy link
Contributor

da-liii commented May 6, 2024

Is there a better and shorter name for std-arc-counterclockwise to express the same idea?

@Oyyko
Copy link
Contributor Author

Oyyko commented May 12, 2024

I've abstracted the common part into a helper function.

@Oyyko
Copy link
Contributor Author

Oyyko commented May 25, 2024

@da-liii I've added sector counterclockwise.

@Oyyko Oyyko requested a review from da-liii May 25, 2024 21:15
Copy link
Contributor

@da-liii da-liii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Linux

@da-liii da-liii merged commit 555fefc into branch-1.2 May 29, 2024
@da-liii da-liii deleted the zj/23_27/counterclockwise_arc branch May 29, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants