problem with cairo_image_surface_create_from_png() and cairo_scale()
cairobeginner cairobeginner <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CAAeDGdNuM-enEHx-C0qqAkZpTB88N-oViZJZ8ShZ5LDky2snoA@mail.gmail.com> |
Hello everybody, first please excuse my bad english. Is there any mailinglist or forum that speaks german? Im also not familiar with mailinglists, i hope i do everything correctly. I have a problem with cairo_image_surface_create_from_png() and cairo_scale(): I'm trying to create something like a console-emulation with GTK and cairo, that is a black screen with 80 x 50 white characters on it. I need this for a game that uses ASCII-Characters to represent everything. Actually this game uses the Windows-API to set the console window to fullscreen, but Microsoft removed that function in Windows 7 so i switched to GTK and Cairo. There is a german thread about at http://www.mikrocontroller.net/topic/246034#new . To do so i created a PNG with all characters and hacked up some code to copy parts of it on the screen. As long as i not use cairo_scale() or use only integer values for scaling this works great (it prints a series of 'x' while im moving with arrow keys), but when i use a float value for zoomY there is only garbage on screen. Can anybody tell my what is going wrong? complete source code is here: http://www.mikrocontroller.net/attachment/134681/main.c chars.png is here: http://www.mikrocontroller.net/attachment/133232/chars.png when using cairo_scale() with float values a picture of the result is here: http://www.mikrocontroller.net/attachment/133241/k_se.png Thank you and have a nice day! cairobeginner -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo