cairo lib update : version 1.10
cairo lib update : version 1.10
here is my work on cairo , i have updated the package to version 1.10
only for windows.
not all the lib is ported. because i une pango for rendering text,glyph...etc
the cairo website : http://www.cairographics.org
here is the package for cairo 1.10: http://www.4shared.com/file/ed03PUDJ/cairo.html
not forget to place an image png in the folder (without this the test code not work properly)
happy new year.
only for windows.
not all the lib is ported. because i une pango for rendering text,glyph...etc
the cairo website : http://www.cairographics.org
here is the package for cairo 1.10: http://www.4shared.com/file/ed03PUDJ/cairo.html
not forget to place an image png in the folder (without this the test code not work properly)
happy new year.
Last edited by hichem on Mon Jan 03, 2011 7:03 pm, edited 2 times in total.
thanks guys,
note please that i haven't tested all the functions be carful when using it.
here is an other example a nice effect (at my point of view)for splash window without using any image
note please that i haven't tested all the functions be carful when using it.
here is an other example a nice effect (at my point of view)for splash window without using any image
Code: Select all
XIncludeFile "cairo180.pbi"
Procedure splash_background(win.i)
Protected cr, pat
cr = GetProp_(WindowID(win),"context")
pat = cairo_pattern_create_linear (0.0, 0.0, 0.0, 256.0)
cairo_pattern_add_color_stop_rgba (pat, 1, 0.9, 0.65, 0.42, 1)
cairo_pattern_add_color_stop_rgba (pat, 0, 0.9, 0.8, 0.42, 1)
cairo_rectangle (cr, 0, 0, WindowWidth(win),WindowHeight(win))
cairo_set_source (cr, pat)
cairo_fill (cr)
cairo_pattern_destroy (pat)
pat = cairo_pattern_create_radial (115.2, 202.4, 25.6, 102.4, 102.4, 128.0);
cairo_pattern_add_color_stop_rgba (pat, 0, 1, 1, 1, 0.4);
cairo_pattern_add_color_stop_rgba (pat, 1, 1, 1, 1, 0.1);
cairo_set_source (cr, pat);
cairo_arc (cr, 128.0, 128.0, 176.8, 0, 2 * #M_PI);
cairo_fill (cr);
cairo_pattern_destroy (pat)
EndProcedure
Global rr.RECT, ps.PAINTSTRUCT
If OpenWindow(0,0,0,400,300,"",#PB_Window_BorderLess | #PB_Window_ScreenCentered)
su = cairo_win32_surface_create(GetDC_(WindowID(0)))
cr = cairo_create(su)
SetProp_(WindowID(0),"surface",su)
SetProp_(WindowID(0),"context",cr)
splash_background(0)
Repeat
events = WaitWindowEvent()
Select events
Case #WM_ERASEBKGND : InvalidateRect_(WindowID(0),@rr,#False)
Case #WM_PAINT
BeginPaint_(WindowID(0), @ps)
splash_background(0)
EndPaint_(WindowID(0), @ps)
Case #PB_Event_CloseWindow
quit = 1
; destroy our surface and cairo context
cairo_surface_destroy(su)
cairo_destroy(cr)
EndSelect
Until quit = 1
EndIf
End
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Thanks, 

https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Re: cairo lib
File dead
, can upload "cairo180.pbi"? Thanks...

Re: cairo lib
Hi!
I'm looking for this lost include-file. Is anybody out there who's still having it? Would be very helpful ...
Thanks in advance! =)
I'm looking for this lost include-file. Is anybody out there who's still having it? Would be very helpful ...
Thanks in advance! =)
Re: cairo lib
And with this include : http://code.google.com/p/rwrappers/sour ... runk/Cairo ?
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: cairo lib
Last edited by DoubleDutch on Tue Mar 09, 2010 11:36 am, edited 1 time in total.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system