Sign in to follow this  
DominicHughes

Cairo & SDL Include / Lib problems ;/

Recommended Posts

Hello just ran into a problem I don't understand why it is happening?

I'm trying to use cairo with sdl obviously but having issues with the functions that I'm so posed to use mainly because the header / cpp file naming "cairosdl.h" and "cairosdl.c" are full of errors when included in my main.cpp file so I was hoping someone could tell me what these errors mean to help in my quest of fixing this problem thank you ! I don't really understand them.

here is a pastebin too the cmd shell error outputs -> [url="http://pastebin.com/vEuJNfYs"]http://pastebin.com/vEuJNfYs[/url]

and here are the functions I used below

[CODE]
cairo_surface_t *cairosurf = cairo_image_surface_create_for_data (
static_cast<unsigned char *>(sdlsurf->pixels),
CAIRO_FORMAT_RGB24,
sdlsurf->w,
sdlsurf->h,
sdlsurf->pitch);

cairo_t *cr = cairosdl_create(sdlsurf);

cairo_set_source_rgba(cr, 1,1,0,0.5);

cairo_rectangle(cr, 25,25,50,50);
cairo_fill(cr);

cairosdl_destroy(cr);

cairo_select_font_face (cr, "serif", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 32.0);
cairo_set_source_rgb (cr, 0.0, 0.0, 1.0);
cairo_move_to (cr, 10.0, 50.0);
cairo_show_text(cr,"Hello, world");
[/CODE] Edited by DarkHorseKnight

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this