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

Add new exported function GetCellPixelsWithCoordinates #1842

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

t4traw
Copy link

@t4traw t4traw commented Mar 11, 2024

PR Details

Added GetCellPixelsWithCoordinates Function to Determine Cell Dimensions in Pixels

Related Issue

#1813

Motivation and Context

To adjust the aspect ratio displayed in individual Excel cells, it is necessary to tweak ScaleX or ScaleY, but there isn't an appropriate public function available for this calculation. Although public functions like GetRowHeight and GetColWidth exist, they do not return values in pixels, and there's a discrepancy with the pixel calculations used within drawingResize in AddPicture. DrawingResize (using getRowHeight and getColWidth) seems to accurately calculate sizes for the most part.

-----GetRowHeight, GetColWidth-----
cellWidth:  306
cellHeight:  333
-----drawingResize(getRowHeight, getColWidth)-----
cellWidth:  360
cellHeight:  264

Therefore, the pixel function used in drawingResize has been extracted as a public function.

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@xuri xuri added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 12, 2024
@xuri xuri force-pushed the master branch 2 times, most recently from 79958aa to 0c3dfb1 Compare May 25, 2024 17:26
@t4traw
Copy link
Author

t4traw commented Jul 17, 2024

Hi @xuri
Could you please let me know if there's anything else needed from my end to move this forward for merge? Your feedback would be greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants