Sounds very interesting.
Please keep us posted!
Felipe Monteiro de Carvalho wrote:
Hello,
I just thougth that the nice gentlement (and madams) that visit this
mailling list would like to know that there is a project to port
Graphics32 to Lazarus.
For those that don't know graphics32, it's a graphics library. Here is
the website: http://www.graphics32.org/wiki/
This isn't ready for users yet, as we haven't made a release yet.
All assembler functions already have pure pascal substitutes, so we
use asm on x86 and pure pascal on other targets. It has also now a
backend system, where the platform specific code (vcl, lcl-win32,
lcl-gtk, lcl-carbon, clx, etc) is isolated.
Christian Budde did a great job porting graphics32 to lazarus-win32.
This is about 95% working now.
I expect to finish the carbon port of graphics32 in the next 3 weeks.
The beginnings of a Gtk backend are presents, but there is currently
noone working on this.
Since graphics32 also has a CLX backend, a lcl-qt port should be quite
easy.
I attached a simple example and a screenshot of the same example
running under Mac OS X with the native carbon interface.
thanks,
Felipe
------------------------------------------------------------------------
------------------------------------------------------------------------
unit MainUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
LCLIntf, LCLType, Math,
GR32, GR32_Image;
type
{ TForm1 }
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ private declarations }
Image: TImage32;
public
{ public declarations }
procedure Draw(X, Y: Integer);
end;
var
Form1: TForm1;
implementation
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
Self.Width := 230;
Self.Height := 230;
Image := TImage32.Create(Self);
Image.Parent := Self;
Image.SetBounds(0, 0, 200, 200);
Image.SetupBitmap;
Image.Bitmap.FillRect(0, 0, 200, 200, clWhite32);
Draw(100, 100);
Image.Bitmap.FillRect(0, 0, 10, 10, clRed32);
Image.Bitmap.FillRect(0, 100, 10, 110, clGreen32);
Image.Bitmap.FillRect(0, 190, 10, 200, clBlue32);
Image.Bitmap.Canvas.Brush.Color := clGreen;
Image.Bitmap.Canvas.FillRect(10, 10, 20, 20);
end;
procedure TForm1.Draw(X, Y: Integer);
var
Theta: Single;
begin
Theta := 0;
Image.Bitmap.MoveToF(X, Y);
while Theta < 15 * 3.1415926535 do
begin
Image.Bitmap.LineToFSP(X + Cos(Theta) * Theta, Y + Sin(Theta) * Theta);
Theta := Theta + 0.2;
end;
end;
initialization
{$I mainunit.lrs}
end.
--
Dave Coventry
Tel (home): +27(0)31 3092301
Tel (office): +27(0)31 2058448
Cell: +27(0)82 9000179
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives