FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Draw some simple rectangles?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Draw some simple rectangles? [message #178716] Mon, 23 July 2012 20:25 Go to next message
Christopher M. is currently offline  Christopher M.
Messages: 9
Registered: March 2012
Karma: 0
Junior Member
I'd like to draw some simple rectangles--maybe have some text and a 7x5
(dimensions) rectangle beside it.

Is there an easy way to do this, or should I just create some images?


W. Pooh (AKA Winnie P.)
Re: Draw some simple rectangles? [message #178717 is a reply to message #178716] Mon, 23 July 2012 22:13 Go to previous messageGo to next message
Paul Herber is currently offline  Paul Herber
Messages: 26
Registered: February 2011
Karma: 0
Junior Member
On Mon, 23 Jul 2012 16:25:35 -0400, "Christopher M." <nospam_flibbity(at)floo(dot)com> wrote:

> I'd like to draw some simple rectangles--maybe have some text and a 7x5
> (dimensions) rectangle beside it.
>
> Is there an easy way to do this, or should I just create some images?

to do this in PHP have a look at the ImageLine function.



--
Regards, Paul Herber, Sandrila Ltd.
http://www.sandrila.co.uk/
Re: Draw some simple rectangles? [message #178718 is a reply to message #178716] Mon, 23 July 2012 22:05 Go to previous messageGo to next message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma: 0
Senior Member
On Mon, 23 Jul 2012 16:25:35 -0400, Christopher M. wrote:
> I'd like to draw some simple rectangles--maybe have some text and a 7x5
> (dimensions) rectangle beside it.
>
> Is there an easy way to do this, or should I just create some images?

Draw this on what? 7x5 whats? Pixels? Inches? How often do you want to
do this?

--
When C++ is your hammer, everything looks like a thumb.
-- Steven M. Haflich
Re: Draw some simple rectangles? [message #178719 is a reply to message #178716] Mon, 23 July 2012 22:37 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
Christopher M. wrote:
> I'd like to draw some simple rectangles--maybe have some text and a 7x5
> (dimensions) rectangle beside it.
>
> Is there an easy way to do this, or should I just create some images?
>
>
A pencil, paper and a stencil is a good start..

Or you could do it on a browser with HTML.

Not sure any of this is relevant to PHP tho.



> W. Pooh (AKA Winnie P.)
>
>


--
To people who know nothing, anything is possible.
To people who know too much, it is a sad fact
that they know how little is really possible -
and how hard it is to achieve it.
Re: Draw some simple rectangles? [message #178720 is a reply to message #178718] Mon, 23 July 2012 22:40 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
Peter H. Coffin wrote:
> On Mon, 23 Jul 2012 16:25:35 -0400, Christopher M. wrote:
>> I'd like to draw some simple rectangles--maybe have some text and a 7x5
>> (dimensions) rectangle beside it.
>>
>> Is there an easy way to do this, or should I just create some images?
>
> Draw this on what? 7x5 whats? Pixels? Inches? How often do you want to
> do this?
>
?>
<div style ="postion: absolute; width:7px;height:5px;
background-color:#FF0000"></div>
<?

--
To people who know nothing, anything is possible.
To people who know too much, it is a sad fact
that they know how little is really possible -
and how hard it is to achieve it.
Re: Draw some simple rectangles? [message #178721 is a reply to message #178716] Tue, 24 July 2012 00:12 Go to previous message
Chuck Anderson is currently offline  Chuck Anderson
Messages: 63
Registered: September 2010
Karma: 0
Member
Christopher M. wrote:
> I'd like to draw some simple rectangles--maybe have some text and a 7x5
> (dimensions) rectangle beside it.
>

Use GD lib. It should be pretty easy with this:
http://www.php.net/manual/en/function.imagerectangle.php

Or even easier, Google his phrase "GD lib draw rectangle tutorial".

> Is there an easy way to do this, or should I just create some images?
>

Probably simpler, but learning how to use GD lib is also a worthwhile
activity - and you can then make different sized rectangles on the fly.

>
> W. Pooh (AKA Winnie P.)
>
>
>


--
*****************************
Chuck Anderson • Boulder, CO
http://cycletourist.com
Turn Off, Tune Out, Drop In
*****************************
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Using PHP and JAVA applets together
Next Topic: Web page design
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 16:17:13 GMT 2024

Total time taken to generate the page: 0.03645 seconds