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

Images - oneCellAnchor #135

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

krishandley
Copy link

@krishandley krishandley commented Aug 26, 2023

Thanks to @ngscheurich and @joseustra for the previous on trying to
get images working.

#124 by was using twoCellAnchor but that needed more details
which were not very easy to perfect with the variable max
character width for different fonts and font sizes.

This is now using a oneCellAnchor to make the calculations much simpler.

I added an option to align the image from the right of a cell.
That's something I needed but you also have to take the max
character width into account.

I also fixed the formula because it didn't work in the example file.

Edit: Forgot I also added font + font_size options to the workbook

Screenshot

The previous work in xou#124 by @ngscheurich and @joseustra
was using a twoCellAnchor but that's quite tricky
to get right.

This is now using a oneCellAnchor to make the
calculations much simpler.

The api is almost the same, but you don't need to add
any emu based values for offsets. You can also align
the image from the right of a cell. That's something
I needed but you also have to take the max character
width into account.

Also added a few extra tests for a few basic files.

I also fixed the formula because it didn't work
in the example file.
@xou xou force-pushed the master branch 3 times, most recently from e7bdfd0 to 68acd8d Compare January 28, 2024 16:00
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

1 participant