[cairo] How to correctly implement an image using GLFW and Cairo

Rafał Jopek rafaljopek at hotmail.com
Fri Feb 18 01:08:37 UTC 2022


Hi,

There is very little information on this, so I decided to write here
How to correctly implement an image using GLFW and Cairo,
The image loads and displays correctly, but the size of the window is changed
the window cannot be properly refreshed
image is distorted and `surface` with finktion `cairo_xlib_surface_create` is damaged.
I don't know if it is possible to put an attachment in Mailing Lists,

link to the code:
https://gist.github.com/rjopek/971b0b87a9dfd6950df133e3567da40b

Solving this problem would motivate me for further examples related to this connection.


I did a few tests and they work fine
here is an example:

https://github.com/rjopek/glcr/blob/main/examples/gl_11.c

[cid:d307c355-53ed-432e-b99d-8e8411df4bf8]


And last question, can anyone provide an example in Cairo how to use xbm​ or xpm​ files in the source code?


Best regards
-- Rafał








-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20220218/358d6818/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gl_11.png
Type: image/png
Size: 35213 bytes
Desc: gl_11.png
URL: <https://lists.cairographics.org/archives/cairo/attachments/20220218/358d6818/attachment-0001.png>


More information about the cairo mailing list