fbgfx addon

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
Post Reply
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

fbgfx addon

Post by D.J.Peters »

fbgfx addon is a collection of fast integer drawing and vector graphics commands it supports a clipping region and matrix stack.

It's under construction but you can help by testing many things if you like.

Use the test *.bas files and the *.bi file as short reference.

download: fbgfxaddon.zip

Joshy

Code: Select all

' graphic context
BeginFrame EndFrame setWindow getLeft getRight getTop getBottom getWidth getHeight getCenter getCenterY 
setColor setRed setGreen setBlue setAlpha getColor getRed getGreen getBlue getAlpha
setFillColor setFillRed setFillGreen setFillBlue setFillAlpha getFillColor getFillRed getFillGreen getFillBlue getFillAlpha
setBoarderColor setBoarderRed setBoarderGreen setBoarderBlue setBoarderAlpha getBoarderColor getBoarderRed getBoarderGreen getBoarderBlue getBoarderAlpha
setClearColor setClearRed setClearGreen setClearBlue setClearAlpha getClearColor getClearRed getClearGreen getClearBlue getClearAlpha

' fast integer drawing
GetPixel DrawPixel FillBoundary DrawHLine DrawVLine DrawLine DrawRectangle FillRectangle DrawCircle FillCircle DrawElipse FillElipse DrawTriangle FillTriangle DrawCurve DrawArc DrawPie FillPie

' image drawing
LoadImage getImageWidth getImageHeight getImageCenter getImageCenterY DrawImage

' vector drawing
BeginPoints EndPoints BeginLines EndLines BeginLineLoop EndLineLoop BeginPolygon EndPolygon BeginComplexPolygon EndComplexPolygon AddVertex AddTransformedVertex AddCurve AddArc AddPie PushMatrix PopMatrix Identiy Rotate Scale Translate AngleDegree
Last edited by D.J.Peters on Oct 12, 2022 18:38, edited 2 times in total.
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: fbgfx addon

Post by MrSwiss »

@Joshy,

a quick look at the .bi revealed a small problem in the 16:16 Type Definition,
at Line 1567 --> :

Code: Select all

' from Multiput by D.J.Peters (Joshy)
type FP16 ' fixed point 16:16
  union
  type
    as ushort l
    as  short h
  end type
  as integer v    '' <-- Long (NOT Integer), on x64 = 64 bit!
  end union
end type
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: fbgfx addon

Post by MrSwiss »

Further, I've noticed an 'automatic' problem, when going 'full screen': it appears, that
only 4:3 ratio is supported (none of the more modern 16:9 ratio). Even if set to some-
thing like 480x270, aka: 1/4 of HD (1920x1080) ... (is that 'expected' behaviour ??).
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: fbgfx addon

Post by dodicat »

These ducks still appear all over Europe, and probably elsewhere.
http://jbl.no/kultur/kom-til-orre-etter ... n/19.38281
I myself have one in this room.
I stumble upon them now and then, while walking the dog.
Of course, we are not too far away from Dublin, so those that I have found only had a short float.
Sometimes I heave them back into the oggin and wish them bon voyage.
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: fbgfx addon

Post by Tourist Trap »

dodicat wrote:These ducks still appear all over Europe, and probably elsewhere.
http://jbl.no/kultur/kom-til-orre-etter ... n/19.38281
I myself have one in this room.
I stumble upon them now and then, while walking the dog.
Of course, we are not too far away from Dublin, so those that I have found only had a short float.
Sometimes I heave them back into the oggin and wish them bon voyage.
New hords of Vickings ;-)
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: fbgfx addon

Post by D.J.Peters »

Because of malware on alice-dsl.net domain I moved all content to my new shiny3d.de server.

Joshy
Post Reply