Skip to content

[WIP] Add options to rotate text 180 and 270 degrees#250

Draft
Copilot wants to merge 4 commits intomasterfrom
copilot/add-text-rotation-options
Draft

[WIP] Add options to rotate text 180 and 270 degrees#250
Copilot wants to merge 4 commits intomasterfrom
copilot/add-text-rotation-options

Conversation

Copy link
Contributor

Copilot AI commented Oct 19, 2025

  • Add new WritingModeEnum value for 180 degree rotation (rl_bt)
  • Update WritingMode parser (GetWritingMode) to handle new value
  • Update designer UI controls (StyleTextCtl, FontCtl) to show new rotation option
  • Update resource files with new rotation option labels
  • Update DesignXmlDraw rendering to handle 180 degree rotation
  • Update PDF rendering (RenderPdf_iTextSharp) to handle all rotation angles properly
  • Update Excel rendering to handle 180 degree rotation
  • Update PageDrawing rendering to handle 180 and 270 degree rotation with transform
  • Update TIF rendering to handle 180 and 270 degree rotation with transform
  • Update RdlViewer PageDrawing for rotation support
  • Build and test the changes (RdlEngine builds successfully)
  • Create test report demonstrating all rotation modes
  • Manual testing on Windows with designer UI

Summary of Changes

This PR adds support for 180-degree text rotation, allowing text to be rotated to 0, 90, 180, or 270 degrees.

Technical Implementation

  1. Enum Addition: Added rl_bt (right-left, bottom-top) to WritingModeEnum for 180-degree rotation
  2. Parser Update: Updated GetWritingMode() to parse "rl-bt" strings
  3. UI Updates: Added "rl-bt" option to WritingMode dropdown in both StyleTextCtl and FontCtl
  4. Rendering Updates:
    • Excel: Added 180-degree rotation support (rotation = 180)
    • PDF: Refactored rotation code to properly handle all angles using matrix transformations
    • Designer: Added 180-degree rotation transform in DesignXmlDraw
    • Screen/Print: Added rotation transform support in PageDrawing for both 180° and 270° modes
    • TIF: Added rotation transform support for 180° and 270° modes
    • Viewer: Added rotation transform support in RdlViewer PageDrawing

Rotation Modes Supported

  • lr-tb: 0 degrees (left-right, top-bottom) - standard horizontal text
  • tb-rl: 90 degrees (top-bottom, right-left) - vertical text, right-to-left
  • rl-bt: 180 degrees (right-left, bottom-top) - upside-down text [NEW]
  • tb-lr: 270 degrees (top-bottom, left-right) - vertical text, left-to-right

Test Report

Created TextRotationTest.rdl demonstrating all four rotation modes with visual examples.

Original prompt

This section details on the original issue you should resolve

<issue_title>Unable to rotate text 180 or 270 deg</issue_title>
<issue_description>There is no option to rotate text to 180 or 270 deg. text should be able to be set to 0, 90, 180 or 270 deg to allow all printing combinations on forms and reports.
</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #134


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 3 commits October 19, 2025 19:50
Co-authored-by: majorsilence <656288+majorsilence@users.noreply.github.com>
…derers

Co-authored-by: majorsilence <656288+majorsilence@users.noreply.github.com>
…0 degrees)

Co-authored-by: majorsilence <656288+majorsilence@users.noreply.github.com>
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.

Unable to rotate text 180 or 270 deg

2 participants