Details
PHP-CAD2D
CAD2D is a class to create an engineering drawing.
Entity data are stored in the associative array.
Class draw the drawing on image after pre-defined entity data.

Usage
First include the cad2d.php
class in your file, and use the class as following to create drawing.
<?php
require_once ("cad2d.php");
$model2d = new CAD2D();
$model2d->setCanvas(200, 800, 1.5);
$model2d->drawGrid(-50, -50, 300, 600, 50);
$fname = "cad2dsample.png";
imagePng($model2d->canvas, './images/'.$fname);
imagedestroy($model2d->canvas);
echo "<img src='images/$fname?u=".time()."'/>";
?>
Examples
Draw Line
Line drawing example code

Draw Polylines And Filling Hatch
Poly Line and Hatch drawing example

Draw Ellipse And Filling Hatch
Ellipse drawing example

Draw Dimension
Dimension drawing example

Draw Text
Text drawing example

Draw Rectangle And Points
Rectangle and Point drawing example

Contact
Contact me for comercial use via mail winaungcho@gmail.com.
|
Name: |
PHP CAD 2D |
Base name: |
php-cad2d |
Description: |
Draw vectorial graphics in an image canvas |
Version: |
1.0 |
PHP version: |
5 |
Licenses: |
Custom (specified in a license file)
MIT/X Consortium License |
|
|
|
Screenshots |
|
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.
|
Files |
|
File |
Role |
Description |
index.php |
Aux. |
Auxiliary script |
File |
Role |
Description |
cad2d.php |
Class |
Class source |
|
Files |
|
File |
Role |
Description |
index.php |
Aux. |
Auxiliary script |
File |
Role |
Description |
cad2d.php |
Class |
Class source |