Search found 988 matches

by UEZ
Apr 13, 2024 8:15
Forum: Sources, Examples, Tips and Tricks
Topic: Simple 2D Ball Collision Demo
Replies: 9
Views: 612

Re: Simple 2D Ball Collision Demo

Nice neil. I added to your example to catch and throw the ball around: ' elastic bouncing ball by neil Const w = 1080 Const h = 720 ScreenRes w, h, 32 Dim As Single x, y, vx, vy, radius, mass, gravity, elasticity, friction, px, py x = 20 y = 20 vx = 6 'velocity x vy = 0 'velocity y radius = 35 gravi...
by UEZ
Apr 12, 2024 16:50
Forum: Libraries Questions
Topic: Cairo DLL creation
Replies: 16
Views: 878

Re: Cairo DLL creation

Both versions are the same. :wink: Are you really sure? .. maybe some (browser) caching issue? or mixup? new https://i.ibb.co/DbG6WpH/image.png old, debug https://i.ibb.co/H20NtS1/image.png (above screenshots are from the x64 builds, but also checked the x86 ones) Also the file size should be signi...
by UEZ
Apr 12, 2024 11:45
Forum: Libraries Questions
Topic: Cairo DLL creation
Replies: 16
Views: 878

Re: Cairo DLL creation

Both versions are the same. :wink:

I need to learn this compiling stuff...
by UEZ
Apr 12, 2024 10:34
Forum: Libraries Questions
Topic: Cairo DLL creation
Replies: 16
Views: 878

Re: Cairo DLL creation

Hi St_W, thanks for the DLLs but it doesn't work because of missing import DLLs which are not default system DLLs. x86: VCRUNTIME140D.dll ucrtbased.dll x64: VCRUNTIME140D.dll VCRUNTIME140_1D.dll ucrtbased.dll Can those functions in these DLLs integrated? Edit: runs properly when copying both missing...
by UEZ
Apr 11, 2024 12:15
Forum: Sources, Examples, Tips and Tricks
Topic: Simple 2D Ball Collision Demo
Replies: 9
Views: 612

Re: Simple 2D Ball Collision Demo

Billiard opening simulation: 'Coded by UEZ build 2024-04-12 #include "fbgfx.bi" Using FB #define _pi (Acos(-1)) Function _Dist(x1 As Double, y1 As Double, r1 As Double, x2 As Double, y2 As Double, r2 As Double) As Boolean Return Sqr((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) < (r1 + r2...
by UEZ
Apr 11, 2024 6:33
Forum: Sources, Examples, Tips and Tricks
Topic: Simple 2D Ball Collision Demo
Replies: 9
Views: 612

Re: Simple 2D Ball Collision Demo

Code corrected - thanks for your feedback.
by UEZ
Apr 10, 2024 20:53
Forum: Sources, Examples, Tips and Tricks
Topic: Simple 2D Ball Collision Demo
Replies: 9
Views: 612

Simple 2D Ball Collision Demo

A simple 2D ball collision incl. mass demo FB Gfx lib : 'Coded by UEZ build 2024-04-10 #include "fbgfx.bi" Using FB Function Rnd2(min As Double, max As Double = &hFFFFFFFF) As Double Dim As Double Rand = Rnd() If max = &hFFFFFFFF Then Return Rand * min If min > max Then Swap min, m...
by UEZ
Apr 08, 2024 21:26
Forum: Libraries Questions
Topic: Cairo DLL creation
Replies: 16
Views: 878

Re: Cairo DLL creation

@srvaldez: thank you very much for looking into this. libcairo-2.dll exists in several programs, such as Inkscape, GIMP, etc. in the latest version 1.18.0. I've written an Autoit script which gets the DLL dependencies recursively from a DLL. :D Maybe I will port it to FB... For example libcairo-2.dl...
by UEZ
Apr 08, 2024 9:30
Forum: Libraries Questions
Topic: Cairo DLL creation
Replies: 16
Views: 878

Cairo DLL creation

Hi, can somebody please compile the latest Cairo code to create one Windows DLL for x64 / x86? I'm too silly to do it by my self. Output should be one DLL same as here: https://github.com/preshing/cairo-windows/releases . Unfortunately preshing stopped creating the DLLs in 2020... Source can be foun...
by UEZ
Apr 01, 2024 9:48
Forum: Sources, Examples, Tips and Tricks
Topic: Waterfall effect
Replies: 18
Views: 1270

Re: Waterfall effect

Water ripples effect: Water Effect
by UEZ
Mar 31, 2024 12:44
Forum: Windows
Topic: Cairo under Windows
Replies: 13
Views: 626

Re: Cairo under Windows

You can say similar about fb any ptr, as in say win32 api where any ptr hwnd= CreateWindowEx(. . ....) It can hold (point to) a lot of information. Simple example type cairo_font_options_t as _cairo_font_options type Cairo_structure as string * 10 s="hi" as double d=5.5 as long l=1024 end...
by UEZ
Mar 30, 2024 23:04
Forum: Sources, Examples, Tips and Tricks
Topic: Waterfall effect
Replies: 18
Views: 1270

Re: Waterfall effect

Here my version of a waterfall: 'Coded by UEZ build 2024-03-30 while watching revision 2024 :-) #include "fbgfx.bi" Using FB Const w = 960 Const w2 = w Shr 1 Const h = Int(w * 9 / 16) Const h2 = h Shr 1 Const _t = 1 / 60 ScreenRes w, h, 32, 2, GFX_ALPHA_PRIMITIVES Or GFX_NO_SWITCH 'Or GFX_...
by UEZ
Mar 29, 2024 23:26
Forum: Windows
Topic: Cairo under Windows
Replies: 13
Views: 626

Re: Cairo under Windows

This is what I got from ChatGPT: The cairo_font_options_t structure in the Cairo graphics library is an opaque data type, meaning its internal details are hidden from users of the library. This structure holds various options that affect how fonts are rendered, but the exact contents of this structu...
by UEZ
Mar 29, 2024 20:02
Forum: Windows
Topic: Cairo under Windows
Replies: 13
Views: 626

Re: Cairo under Windows

@dodicat: thank you for your example. I know about cairo_select_font_face but as mentioned somewhere above I'm porting the Cairo functions to Autoit and while going thru the font function I realized that a lot of font functions refer to struct cairo_font_options_t which is not described somewhere.
by UEZ
Mar 29, 2024 14:19
Forum: Sources, Examples, Tips and Tricks
Topic: Waterfall effect
Replies: 18
Views: 1270

Re: Waterfall effect

I like it - well done. Slightly modified by adding blue shades and transparency: #include "fbgfx.bi" Using FB #define Min(a, b) (IIf(a < b, a, b)) #define Max(a, b) (IIf(a > b, a, b)) #define Col(c) Max(0, Min(255, c)) ' waterfall effect by neil ScreenRes 800, 600, 32, 1, GFX_ALPHA_PRIMITI...