Search found 1006 matches

by Roland Chastain
May 18, 2024 8:17
Forum: Sources, Examples, Tips and Tricks
Topic: Cairo animated spiral
Replies: 15
Views: 1031

Re: Cairo animated spiral

hhr wrote: May 09, 2024 17:46 Compiling this takes a very long time. I don't know why this is the case.
Interesting method for drawing points. Thanks for sharing.
by Roland Chastain
Apr 21, 2024 21:51
Forum: Sources, Examples, Tips and Tricks
Topic: Theodorus Spiral
Replies: 4
Views: 536

Re: Theodorus Spiral

dafhi wrote: Apr 21, 2024 3:38 thanks for providing the image. that's beautiful.
Thank you for the compliment.
by Roland Chastain
Apr 20, 2024 17:14
Forum: Sources, Examples, Tips and Tricks
Topic: Custom typeface (font)
Replies: 8
Views: 800

Re: Custom typeface (font)

Hello everybody! Maybe you could be interested in SMFONTS. It's a collection of fonts in Pascal. I imagine it would be easy to adapt them for FreeBASIC.
by Roland Chastain
Apr 19, 2024 11:04
Forum: Sources, Examples, Tips and Tricks
Topic: Theodorus Spiral
Replies: 4
Views: 536

Re: Theodorus Spiral

Here is a Cairo version. https://codeberg.org/rchastain/theodorus-spiral-freebasic/media/branch/main/image.png ' color.bi type TColor r as double g as double b as double a as double declare constructor(as uinteger) declare constructor(as double, as double, as double, as double = 1.0) end type constr...
by Roland Chastain
Apr 18, 2024 21:55
Forum: Sources, Examples, Tips and Tricks
Topic: Theodorus Spiral
Replies: 4
Views: 536

Theodorus Spiral

Hello everybody! Here is a simple Theodorus spiral. ' vectors.bi type TVector x as double y as double end type declare function Rotate(byval AVector as TVector, byval ATheta as double) as TVector declare function Perpendicular(byval AVector as TVector, byval AClockWise as boolean = FALSE) as TVector...
by Roland Chastain
Apr 12, 2024 12:59
Forum: Libraries Questions
Topic: Cairo DLL creation
Replies: 16
Views: 5026

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: 5026

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: 5026

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: 5026

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: 1675

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: 1675

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: 1675

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: 14
Views: 2352

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: 14
Views: 2352

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...