-
Notifications
You must be signed in to change notification settings - Fork 57
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
CairoSurface using Float64 for width and height #321
Comments
I think it's because the surface type is used for all surfaces and the vector surfaces like SVG and PDF are created in Float64 dimensions (https://www.cairographics.org/manual/cairo-SVG-Surfaces.html#cairo-svg-surface-create) |
In that case it would probably be better to either have two separate types or to allow the type to accept either int or float values, not convert everything to float. |
Does storing Float64 introduce problems in your code? |
Having to convert between integers and floats a lot can be a minor performance issue when done a lot of times. And that kind of thing has to be done when doing maths involving exact pixels. |
FWIW, I was about to ask the same thing before I saw this issue. The |
Is there a specific reason why they are stored as Float64s?. The documentation for Cairo uses integers for these. For example cairo-image-surface-get-height.
The text was updated successfully, but these errors were encountered: