Search found 1000 matches

by Roland Chastain
Apr 12, 2024 12:59
Forum: Libraries Questions
Topic: Cairo DLL creation
Replies: 16
Views: 1002

Re: Cairo DLL creation

@St_W

Tested successfully the DLL. Thanks! But I had to rename it libcairo-2.dll.
by Roland Chastain
Apr 11, 2024 22:55
Forum: Libraries Questions
Topic: Cairo DLL creation
Replies: 16
Views: 1002

Re: Cairo DLL creation

While we are looking for a solution, I tried to write some reusable code to show nicely Cairo version in all programs. The method for drawing the rectangle comes from a C example shipped with Cairo source. ' cairocolor.bi type tcairocolor r as double g as double b as double a as double declare const...
by Roland Chastain
Apr 10, 2024 13:39
Forum: Libraries Questions
Topic: Cairo DLL creation
Replies: 16
Views: 1002

Re: Cairo DLL creation

Hello srvaldez. Yes. I made a quick attempt with Cairo 1.18.0, without success. makefile.mingw:15: cairo-1.18.0/build/Makefile.win32.features: No such file or directory makefile.mingw:17: cairo-1.18.0/src/Makefile.win32.features: No such file or directory makefile.mingw:18: cairo-1.18.0/src/Makefile...
by Roland Chastain
Apr 09, 2024 21:35
Forum: Libraries Questions
Topic: Cairo DLL creation
Replies: 16
Views: 1002

Re: Cairo DLL creation

Found something that looks interesting: https://sourceforge.net/projects/graphiclibs/
by Roland Chastain
Apr 06, 2024 19:18
Forum: Sources, Examples, Tips and Tricks
Topic: Three swinging sticks kinetic energy
Replies: 16
Views: 1341

Re: Three swinging sticks kinetic energy

Yes, the code is better like this. Updated the Cairo version . I used transparent colors, to make more obvious the advantage of using Cairo. I also tried another way to initialize angles. All pendulums start are at the same position, but they are releashed one after the other. Just comment out my co...
by Roland Chastain
Apr 06, 2024 15:18
Forum: Sources, Examples, Tips and Tricks
Topic: Three swinging sticks kinetic energy
Replies: 16
Views: 1341

Re: Three swinging sticks kinetic energy

neil wrote: Apr 04, 2024 22:40 With my latest update, version 3, using arrays, maybe you could make a Cairo version.
Thanks! I will look at it.
by Roland Chastain
Apr 04, 2024 21:49
Forum: Sources, Examples, Tips and Tricks
Topic: Three swinging sticks kinetic energy
Replies: 16
Views: 1341

Re: Three swinging sticks kinetic energy

Nice! Here is a Cairo version. ' https://www.freebasic.net/forum/viewtopic.php?p=302813#p302813 ' Eight swinging sticks kinetic energy using arrays by neil ' Cairo version #include once "cairo/cairo.bi" const W as integer = 640 const H as integer = 640 const as double g = 9.81 ' accelerati...
by Roland Chastain
Mar 29, 2024 22:10
Forum: Windows
Topic: Cairo under Windows
Replies: 13
Views: 701

Re: Cairo under Windows

Here is how I do fonts in Cairo, I have found no problems with the method. Please check the value of chrs._text.width and chrs._text.height ! Sub Cprint(surf As cairo_t Ptr,x As Long,y As Long,text As String,size As Single,colour As Ulong) print(chrs._text.width) print(chrs._text.height) As I said ...
by Roland Chastain
Mar 29, 2024 15:35
Forum: Windows
Topic: Cairo under Windows
Replies: 13
Views: 701

Re: Cairo under Windows

Any idea? I scanned my (big) collection of Cairo examples (in Basic, C and Pascal) and found only this: var ... font_options: cairo_font_options_t; begin ... cairo_select_font_face(context, 'Courier New', CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD); cairo_font_options_set_antialias(@font_optio...
by Roland Chastain
Mar 28, 2024 11:17
Forum: Sources, Examples, Tips and Tricks
Topic: Cairo animated spiral
Replies: 11
Views: 619

Re: Cairo animated spiral

I am now enjoying the animated spiral. The interesting point in this example (if I may say) is that it uses an image for drawing, instead of drawing directly on the screen (as do almost all examples that you can find in the forum). I posted it here a version using sGUI2, where the animation can be ...
by Roland Chastain
Mar 25, 2024 21:43
Forum: Windows
Topic: Cairo under Windows
Replies: 13
Views: 701

Re: Cairo under Windows

Hello!

I left Windows several years ago, and I no longer feel interest for it, but I still have on my HD some examples that I have made in Pascal. I put them on my website, in case you would like to take a look: freepascal-cairo-win32-examples.zip

Regards.

Roland
by Roland Chastain
Mar 22, 2024 10:21
Forum: General
Topic: screenres with a vertical scroll bar
Replies: 16
Views: 832

Re: screenres with a vertical scroll bar

jaskin wrote: Mar 15, 2024 20:04 Is it possible to have a vertical scroll bar when using screenres to create a window?
You might take a look to the sGUI library, which has a scrollbar, and is multiplatform.
by Roland Chastain
Mar 20, 2024 10:32
Forum: Sources, Examples, Tips and Tricks
Topic: Cairo animated spiral
Replies: 11
Views: 619

Cairo animated spiral

Hello everybody! Here is a little thing I have made. It's an animated spiral using Cairo (idea taken here ). Warning: Don't keep your eyes fixed on the animation, otherwise you will feel dizzy. :) #include once "cairo/cairo.bi" const WINDOW_W = 480 const WINDOW_H = 480 screenres WINDOW_W, ...
by Roland Chastain
Jan 13, 2024 9:19
Forum: Projects
Topic: Eschecs FreeBASIC (UCI chess GUI)
Replies: 446
Views: 96690

Re: Eschecs FreeBASIC (UCI chess GUI)

Hello everybody!

I applied the modifications suggested by neil here (thanks to him), and uploaded the project to a git repository:

https://codeberg.org/rchastain/eschecs-freebasic

Compilation successfully tested with fbc 1.10.1 under Linux.
by Roland Chastain
Jun 25, 2023 15:29
Forum: Libraries & Headers
Topic: FLTK headers for FreeBasic OOP (no C wrapper)
Replies: 232
Views: 26548

Re: FLTK headers for FreeBasic OOP (no C wrapper)

angros47 wrote: Jun 21, 2023 23:52 I hope developers and users could take over, in future, but I will try to provide support, if I can.
Could you share also your examples somewhere?