Search found 7932 matches
- Apr 10, 2024 1:19
- Forum: Sources, Examples, Tips and Tricks
- Topic: Custom typeface (font)
- Replies: 5
- Views: 365
Re: Custom typeface (font)
Nice fonts Badidea. Many years ago I painfully made up the keyboard characters ,British, including chr(163) the £ sign. I don't know how £ will show over there!. Namespace show Sub rotate(Byval pivot_x As Double,_ 'turns about this point Byval pivot_y As Double,_ Byval first_x As Double,_ 'centre fo...
- Apr 05, 2024 20:14
- Forum: Sources, Examples, Tips and Tricks
- Topic: Waterfall effect
- Replies: 18
- Views: 1333
Re: Waterfall effect
Waterfall effect slower. #cmdline "-gen gcc -O 2" Dim Shared As Long Xres,Yres Screenres 1024,850,32,,64 Screeninfo (Xres),(Yres) Type pt As Long x,y As Ulong col As Long jmp End Type 'get a point (Length pixels) along a line between fp and p Function shortline(fp As pt,p As pt,length As I...
- Mar 30, 2024 12:18
- Forum: Sources, Examples, Tips and Tricks
- Topic: Waterfall effect
- Replies: 18
- Views: 1333
Re: Waterfall effect
Nice neil. Good to see these little graphicals in fb again. Pure rain Sub Rain(z As Any Ptr,xres As Long,yres As Long) Const max=1000 Static As Single xx(max),yy(max) For i As Long = 0 To max xx(i) = Rnd*xres yy(i) = Rnd*yres Put(xx(i),yy(i)),z,Alpha,Rnd*200 Next End Sub Screen 20,32 Color ,Rgb(200,...
- Mar 30, 2024 11:37
- Forum: Windows
- Topic: Cairo under Windows
- Replies: 13
- Views: 705
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 ...
- Mar 29, 2024 22:43
- Forum: Windows
- Topic: Cairo under Windows
- Replies: 13
- Views: 705
Re: Cairo under Windows
Thanks Roland, I Ican add it in. #include "cairo/cairo.bi" #define _rd_ Cast(Ubyte Ptr,@colour)[2]/255 #define _gr_ Cast(Ubyte Ptr,@colour)[1]/255 #define _bl_ Cast(Ubyte Ptr,@colour)[0]/255 #define _al_ Cast(Ubyte Ptr,@colour)[3]/255 Namespace chrs Dim As cairo_font_extents_t _fonts Dim A...
- Mar 29, 2024 20:16
- Forum: Beginners
- Topic: array initialization
- Replies: 8
- Views: 355
Re: array initialization
A little macro to fill an array without too much typing: #macro fill(a,r,datatype,d...) Redim a(r) Scope Dim As datatype x(r)=d For n As Long=0 To Ubound(a) a(n)=x(n) Next End Scope #endmacro Dim Shared As String f() fill(f,2,String,{"apple", "orange", "banana"}) Dim Sh...
- Mar 29, 2024 19:24
- Forum: Windows
- Topic: Cairo under Windows
- Replies: 13
- Views: 705
Re: Cairo under Windows
Here is how I do fonts in Cairo, I have found no problems with the method. (Tested 64 bits) Win 11. #cmdline "-s gui" #include "fbgfx.bi" #include once "cairo/cairo.bi" #define _rd_ Cast(Ubyte Ptr,@colour)[2]/255 #define _gr_ Cast(Ubyte Ptr,@colour)[1]/255 #define _bl_ ...
- Mar 27, 2024 10:53
- Forum: Windows
- Topic: Cairo under Windows
- Replies: 13
- Views: 705
Re: Cairo under Windows
Hi UEZ/Roland. I'm hardly ever on the pascal forum these days, but I have the 3.2.2 compiler here. A strange thing happened here on win 11. I was messing about with UEZ's code , trying to get an opengl screen ensconced in a win32 api using a winproc function. At some stage during my tribulations I h...
- Mar 26, 2024 13:13
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 269
- Views: 24759
Re: Freebasic 1.20.0 Development
Thanks for the link fxm.
- Mar 26, 2024 10:59
- Forum: Community Discussion
- Topic: Freebasic 1.20.0 Development
- Replies: 269
- Views: 24759
Re: Freebasic 1.20.0 Development
I tried to force a const chr(0). Results: '#include "crt.bi" const C=!"\0" #print typeof(C) Sub memcopy(dest As Any Ptr,src As Any Ptr,count As Long) Dim As Ubyte Ptr newdst=dest Dim As Ubyte Ptr newsrc=src While count count-=1 *newdst=*newsrc newdst+=1 newsrc+=1 Wend End Sub pri...
- Mar 26, 2024 9:23
- Forum: Archive
- Topic: quitting smoking app
- Replies: 3
- Views: 2326
Re: quitting smoking app
The best time to stop smoking is April fool's day, 1 April. I stopped 1 April 10 years ago because as you get older stopping is a life requirement. I know others who have stopped on that day. You very rarely see old people still smoking, a few yes, but these are exceptionally tough people. You will ...
- Mar 23, 2024 12:08
- Forum: Documentation
- Topic: SmartPointer_UDTname_ segmentation violation
- Replies: 10
- Views: 425
Re: SmartPointer_UDTname_ segmentation violation
That is when you use the option -pp to isolate an error. simple example: fillmatrix.bas '#cmdline "-pp" Type Matrix Dim As Double m( Any , Any ) Declare Constructor ( ) Declare Constructor ( Byval x As Uinteger , Byval y As Uinteger ) Declare Operator Cast() As String End Type Constructor ...
- Mar 21, 2024 0:46
- Forum: General
- Topic: screenres with a vertical scroll bar
- Replies: 16
- Views: 844
Re: screenres with a vertical scroll bar
The opengl screens are kind of bare bones, they can handle some win32 components. I have not tried scrolling though, maybe sometime. Here are a few: buttons, themes, disable fullscreen, tooltips, fonts. #include "windows.bi" #Include once "/win/commctrl.bi" #include "GL/gl.b...
- Mar 20, 2024 11:04
- Forum: Community Discussion
- Topic: Bugs
- Replies: 115
- Views: 21218
Re: Bugs
Thank you all for looking into this byval.
Yes srvaldez, static in the sub would have been the proper way.
The last thing I would have thought of was passing a value byval to a procedure, I came across it by accident.
Yes srvaldez, static in the sub would have been the proper way.
The last thing I would have thought of was passing a value byval to a procedure, I came across it by accident.
- Mar 19, 2024 21:00
- Forum: Sources, Examples, Tips and Tricks
- Topic: Read line x from a text file
- Replies: 2
- Views: 184
Re: Read line x from a text file
You have added an extra line end (chr(10)) to the last line in the file in 64 bits. The last line looks strange in 32 bits. 'Coded by UEZ build 2024-03-19 beta #cmdline "-exx" #include "file.bi" Type tFile As WString * 4096 Name End Type Function FileReadLine(sFile As tFile, iLin...