Skip to content

Remove or refactor sxbp_walk_figure() scaling #223

@saxbophone

Description

@saxbophone

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions