Recent

Author Topic: BGRABitmap chessboard for fpGUI  (Read 9110 times)

Roland Chastain

  • Guest
BGRABitmap chessboard for fpGUI
« on: May 21, 2015, 04:09:44 pm »
Hello gentlemen ! I would like to present my BGRABitmap chessboard for fpGUI.

It is made for fpGUI but there would be almost nothing to change to get a LCL version.

Please notice that it isn't a chess game. You can do what you wish with the pieces. It's just a graphical chessboard.

Quote from: Jean de la Fontaine
Petit poisson deviendra grand,
Pourvu que Dieu lui prête vie.

Thank you to circular for the marble.

To move a piece, click on the piece and then click on the square you wish to move it to.

bgrachessboard.zip
« Last Edit: May 23, 2015, 08:58:29 pm by Roland Chastain »

sfeinst

  • Full Member
  • ***
  • Posts: 186
Re: BGRABitmap chessboard for fpGUI
« Reply #1 on: May 21, 2015, 04:48:35 pm »
Looks nice.  Have any tips on creating a cribbage board with moveable pegs?  I wrote a cribbage game, but has no board, so I have to figure out how to make one.

Roland Chastain

  • Guest
Re: BGRABitmap chessboard for fpGUI
« Reply #2 on: June 13, 2015, 05:04:41 pm »
Looks nice.

Thank you.

Have any tips on creating a cribbage board with moveable pegs?  I wrote a cribbage game, but has no board, so I have to figure out how to make one.

No I don't, sorry.

« Last Edit: June 20, 2015, 12:29:01 pm by Roland Chastain »

Roland Chastain

  • Guest
Re: BGRABitmap chessboard for fpGUI
« Reply #3 on: June 15, 2015, 11:49:27 am »
Here is the chessboard with an arbiter, an engine and a book.

http://www.eschecs.fr/fichiers/eschecs-freepascal-2.2.zip

Hope you will like it.  :)
« Last Edit: June 20, 2015, 08:32:37 am by Roland Chastain »

mai

  • Full Member
  • ***
  • Posts: 133
  • truther
does not compile
« Reply #4 on: October 25, 2015, 04:28:27 pm »
my BGRABitmap chessboard for fpGUI.

It is made for fpGUI but there would be almost nothing to change to get a LCL version.



keeping a release thread as brief as this just guarantuees that people will not be able to compile it.

under Lazarus, this doesn't build, packages missing and no link where to find them.  :(


the underlying package BGRA...   from sourceforge  does not compile either:
 
bgraqtbitmap.pas(110,26) Error: identifier idents no member "Init_BPP32_R8G8B8_BIO_TTB"



in:


procedure TBGRAQtBitmap.DataDrawOpaque(ACanvas: TCanvas; Rect: TRect;
  AData: Pointer; ALineOrder: TRawImageLineOrder; AWidth, AHeight: integer);
var
  Temp:     TBitmap;
  RawImage: TRawImage;
  BitmapHandle, MaskHandle: HBitmap;
  CreateSuccess: boolean;
begin
  if (AHeight = 0) or (AWidth = 0) then
    exit;

  RawImage.Init;
  if TBGRAPixel_RGBAOrder then
    RawImage.Description.Init_BPP32_R8G8B8_BIO_TTB(AWidth, AHeight)                   <------  error producing !





« Last Edit: October 25, 2015, 05:30:24 pm by mai »

Roland Chastain

  • Guest
Re: BGRABitmap chessboard for fpGUI
« Reply #5 on: October 25, 2015, 07:06:39 pm »
@mai

Hello!

Thank you for your interest in my program. Yes, you are right, I should provide more documentation. Maybe also I should include the libraries in the ZIP.

The program uses two libraries that are not included in Lazarus: fpGUI and BGRABitmap. Once you have downloaded these libraries, you just have to open (in Lazarus IDE) the two following packages: BGRABitmapPack4fpGUI.lpk and fpgui_toolkit.lpk, and build the project.

The compilation was tested under Windows, with Lazarus 1.4. I don't know why you get that error. Maybe you could give more details about your own installation?
« Last Edit: October 25, 2015, 07:12:02 pm by Roland Chastain »

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: BGRABitmap chessboard for fpGUI
« Reply #6 on: October 25, 2015, 08:59:24 pm »
Hi Roland,
Good chessboard!
Dont forget to participate in the next BGRA Contest ,It will be fun

Roland Chastain

  • Guest
Re: BGRABitmap chessboard for fpGUI
« Reply #7 on: October 25, 2015, 09:08:23 pm »
Hi Roland,
Good chessboard!

Thank you!  :)

Dont forget to participate in the next BGRA Contest ,It will be fun

I won't forget.  ;)

Graeme

  • Hero Member
  • *****
  • Posts: 1430
    • Graeme on the web
Re: BGRABitmap chessboard for fpGUI
« Reply #8 on: October 26, 2015, 12:33:29 am »
Here is my chessboard version I wrote years back (just for fun - while testing Unicode support in fpGUI). It was created in fpGUI, using fpGUI's standard StringGrid and a Unicode font for the chess pieces. :-)  Chess pieces could be moved around with the keyboard or mouse. It didn't have a chess engine though. ;-)

  http://geldenhuys.co.uk/~graemeg/Screenshot-fpGUI_Unicode_Chess.png
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Carver413

  • Full Member
  • ***
  • Posts: 119
Re: BGRABitmap chessboard for fpGUI
« Reply #9 on: October 26, 2015, 12:39:15 am »
Here is my chessboard version I wrote years back (just for fun - while testing Unicode support in fpGUI). It was created in fpGUI, using fpGUI's standard StringGrid and a Unicode font for the chess pieces. :-)  Chess pieces could be moved around with the keyboard or mouse. It didn't have a chess engine though. ;-)

  http://geldenhuys.co.uk/~graemeg/Screenshot-fpGUI_Unicode_Chess.png
so does this mean your going to enter the next contest ? agg vs bgra

Graeme

  • Hero Member
  • *****
  • Posts: 1430
    • Graeme on the web
Re: BGRABitmap chessboard for fpGUI
« Reply #10 on: October 26, 2015, 01:07:35 am »
so does this mean your going to enter the next contest ? agg vs bgra
Unfortunately no... I would have an unfair advantage. I don't want all BGRA users to feel bad that AggPas is better.  ;)

The real truth is I simply don't have the time.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Carver413

  • Full Member
  • ***
  • Posts: 119
Re: BGRABitmap chessboard for fpGUI
« Reply #11 on: October 26, 2015, 02:12:27 am »
so does this mean your going to enter the next contest ? agg vs bgra
Unfortunately no... I would have an unfair advantage. I don't want all BGRA users to feel bad that AggPas is better.  ;)

The real truth is I simply don't have the time.
all work and no play?

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: BGRABitmap chessboard for fpGUI
« Reply #12 on: October 26, 2015, 08:19:08 am »
Quote
It was created in fpGUI, using fpGUI's standard StringGrid and a Unicode font for the chess pieces.
Nice trick, when you made that using font as UI element was not as much popular as now.
Quote
I would have an unfair advantage. I don't want all BGRA users to feel bad that AggPas is better.
Oh, AggPas is very good but on bitmap editing and effects BGRA fill much more better than any graphic library I ever test in Delphi and Lazarus.
I didnt use AggPas for years excerpt when using fpGUI,does it support bitmap editing like BGRA? I remember it does mostly vectors.
Quote
The real truth is I simply don't have the time.
Yeah Graeme,try to play, it will be fun for you and learning for me ;)

Graeme

  • Hero Member
  • *****
  • Posts: 1430
    • Graeme on the web
Re: BGRABitmap chessboard for fpGUI
« Reply #13 on: October 27, 2015, 02:54:53 pm »
Nice trick, when you made that using font as UI element was not as much popular as now.
Indeed, using fonts to represent such glyphs is now very popular. FontAwesome and other web technologies use it all the time now.

Quote
Oh, AggPas is very good but on bitmap editing and effects BGRA fill much more better than any graphic library I ever test in Delphi and Lazarus.
I chalk it down to simply what API you are used too.

Quote
I didn't use AggPas for years excerpt when using fpGUI,does it support bitmap editing like BGRA? I remember it does mostly vectors.
Yes on both counts. From all the examples I've seen mentioned here in the forums and the FPC wiki, AggPas can do the same (using a different API of course), but it can do more too. Somebody (can't remember the link) did some speed comparisons between BGRABitmap and AggPas too, and AggPas was faster in quite a few tests. The dynamic rendering pipeline in AGG & AggPas is really fantastic and unbelievably flexible feature too. I haven't seen any other graphics library implement something like that yet. Built-in SVG support is also very very useful.

Quote
Yeah Graeme,try to play, it will be fun for you and learning for me ;)
Has anybody presented some results yet?
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: BGRABitmap chessboard for fpGUI
« Reply #14 on: October 27, 2015, 03:12:51 pm »
Very good.
Quote
Has anybody presented some results yet?
Take a look at here.

 

TinyPortal © 2005-2018