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

Remove or refactor sxbp_walk_figure() scaling #223

Open
saxbophone opened this issue Nov 14, 2018 · 2 comments
Open

Remove or refactor sxbp_walk_figure() scaling #223

saxbophone opened this issue Nov 14, 2018 · 2 comments
Labels

Comments

@saxbophone
Copy link
Owner

This actually might not be needed for making figures bigger in both x and y directions (to be confirmed once the SVG renderer is complete).

It certainly isn't needed for scaling bitmaps, as these should ideally simply be scaled up after rendering the initial bitmap (do a simple whole number scale, without Gaussian blurring which I think is mathematically simple to do).

If the scaling parameter is to be retained, its datatype should certainly be changed to something small like uint8_t, as size_t is overkill and just asking for overflow (technically, even uint8_t can overflow, but with restricted range comes much less likelihood of overflow from usage).

On the note of overflow, perhaps it would be a good idea to add a sanity-check in sxbp_walk_figure() which checks that the given size and scaling will not cause overflow before beginning the operation.

@saxbophone
Copy link
Owner Author

Blocked on #221

@saxbophone
Copy link
Owner Author

Not blocked any more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant