Jump to content

Recommended Posts

Hi all,

 

i currently have a clock that uses GD to draw.It works fine but, it draws like follows;

 

$clock = new AnalogClock(128); // Create a 128x128 pixel clock
$clock->timezone = +9; // GMT -0600

/* These affect the way the clock looks */
$clock->Alias(TRUE); // Turn on anti-aliasing
$clock->Background('bg.gif'); // Add a background image

/* The clock's hands */
$clock->NewHand('hour', 'line', '000000', 20, 3, TRUE);
$clock->NewHand('min', 'line', '000000', 35, 3, TRUE);

$clock->DrawOverlay('plain-overlay.png');
$clock->DrawPNG(); // Output as a PNG

 

is there away to change this so it uses echo.

 

e.g.

 


$output = "DrawPNG()";

$clock = new AnalogClock(128); // Create a 128x128 pixel clock
$clock->timezone = +9; // GMT -0600

/* These affect the way the clock looks */
$clock->Alias(TRUE); // Turn on anti-aliasing
$clock->Background('bg.gif'); // Add a background image

/* The clock's hands */
$clock->NewHand('hour', 'line', '000000', 20, 3, TRUE);
$clock->NewHand('min', 'line', '000000', 35, 3, TRUE);

$clock->DrawOverlay('plain-overlay.png');

echo "$output";

 

This obviously does not work but its the best way i could explain it.

 

Thanks

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/84828-gd-clock/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.