GRAPHICS HELP : PLEASE PLEASE????

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

GRAPHICS HELP : PLEASE PLEASE????

Zachary Marlow
Hello,  
        Everyone I need some help can anyone help me and give some simple graphics code for reference.
                  Sincerely,
                                 ZACH


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: GRAPHICS HELP : PLEASE PLEASE????

Graeme Geldenhuys-4
Zachary Marlow wrote:
>         Everyone I need some help can anyone help me and give some
> simple graphics code for reference.

You need to be a lot more specific...  What do you want to do?

 
Regards,
 - Graeme -

________________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: GRAPHICS HELP : PLEASE PLEASE????

M Pulis
In reply to this post by Zachary Marlow
So, a simple Google  "pascal graphics code samples" did not help?

Without a _lot_ more detail (beginner, PC/Mac OS etc....) we can't help you, one please or a dozen....

Google first, list second.

Sincerely,
Everyone :-)



On Jun 27, 2009, at 8:32 PM, Zachary Marlow wrote:

Hello,  
        Everyone I need some help can anyone help me and give some simple graphics code for reference.
                  Sincerely,
                                 ZACH

_______________________________________________
fpc-pascal maillist  -  [hidden email]


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: GRAPHICS HELP : PLEASE PLEASE????

Zachary Marlow
In reply to this post by Zachary Marlow
Well
      Like How to draw a circle , I just need some example code please
 
PS THANKS FOR READING AND REPLYING



--- On Sun, 6/28/09, Graeme Geldenhuys <[hidden email]> wrote:

From: Graeme Geldenhuys <[hidden email]>
Subject: Re: [fpc-pascal] GRAPHICS HELP : PLEASE PLEASE????
To: "FPC-Pascal users discussions" <[hidden email]>
Date: Sunday, June 28, 2009, 2:05 AM

Zachary Marlow wrote:
>         Everyone I need some help can anyone help me and give some simple graphics code for reference.

You need to be a lot more specific...  What do you want to do?


Regards,
- Graeme -

________________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@...
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: GRAPHICS HELP : PLEASE PLEASE????

John Coppens
On Sun, 28 Jun 2009 18:23:12 -0700 (PDT)
Zachary Marlow <[hidden email]> wrote:

> Well
>       Like How to draw a circle , I just need some example code please

Check this tutorial:

http://pascalprogramming.byethost15.com/lesson8.php

John
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: GRAPHICS HELP : PLEASE PLEASE????

Guillermo Martínez Jiménez-2
In reply to this post by Zachary Marlow
> From: Zachary Marlow <[hidden email]>
> Subject: Re: [fpc-pascal] GRAPHICS HELP : PLEASE PLEASE????
> To: FPC-Pascal users discussions <[hidden email]>
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Well =
>
> =A0=A0=A0=A0=A0 Like How to draw a circle , I just need some example code p=
> lease =
>
> =A0
> PS THANKS FOR READING AND REPLYING

There are a lot of ways to draw a circle. It depends why and where you
need to draw a circle. There are a lot of differences if you need to
draw it using X11 or using a graphical library. For example, using the
Allegro.pas library:

(* Draw circle using Allegro (http://allegro-pas.sourceforge.net/) *)
PROGRAM circle;

USES
  allegro;

BEGIN
  IF NOT al_init THEN
  BEGIN
    WriteLn ('Error initialising Allegro');
    EXIT;
  END;
  IF al_set_gfx_mode (AL_GFX_AUTODETECT, 320, 240, 0, 0) THEN
  BEGIN
    al_install_keyboard;
    al_circle (al_screen, 160, 100, 50, al_makecol (255, 255, 255));
    al_readkey;
    al_exit;
  END
  ELSE
    WriteLn ('Error setting graphics');
END.

Another way, using Lazarus add a TPaintBox to the TForm and set the
"onDraw" event of the TPaintBox to this:

PROCEDURE TForm1.PaintBox1Paint(Sender: TObject);
VAR
  Tmp: TForm1;
BEGIN
  Tmp := SELF;
  WITH (Sender AS TPaintBox).Canvas DO
  BEGIN
    Ellipse (0, 0, Tmp.Width - 1, Tmp.Height - 1);
  END;
END;
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal