You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
, assize_t
is overkill and just asking for overflow (technically, evenuint8_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.The text was updated successfully, but these errors were encountered: