<repo_name>Wedina/svg<file_sep>/paint.php
<?php
include 'classes/Rectangle.php';
include 'classes/Circle.php';
include 'classes/Ellipse.php';
include 'classes/polygon.php';
include 'classes/etoile.php';

$rect = new Rectangle(100, 50);
$rect->setPosition(300, 20);
$rect->setColor('tomato');

$rect3 = new Rectangle(100, 50);
$rect3->setPosition(310, 25);
$rect3->setColor('DARKCYAN');

$rect4 = new Rectangle(100, 50);
$rect4->setPosition(320, 30);
$rect4->setColor('LIGHTSEAGREEN');

$rect5 = new Rectangle(100, 50);
$rect5->setPosition(325, 35);
$rect5->setColor('DARKSEAGREEN');

$rect6 = new Rectangle(200,200);
$rect6->setPosition(425, 70);
$rect6->setColor('LIGHTCYAN');


$rect2 = new Rectangle(60, 90);
$rect2->setPosition(50, 100);
$rect2->setColor('LIGHTSALMON');

$circle = new circle(40);
$circle->setPosition(100, 20);
$circle->setColor('green');
$circle->setOpacity(0.8);

$circle2 = new circle(40);
$circle2->setPosition(160, 40);
$circle2->setColor('LIGHTGREEN');
$circle2->setOpacity(0.8);

$ellipse = new ellipse(40, 70);
$ellipse->setPosition(300, 80);
$ellipse->setColor('yellow');
$ellipse->setOpacity(0.4);

$ellipse2 = new ellipse(40, 70);
$ellipse2->setPosition(250, 80);
$ellipse2->setColor('SADDLEBROWN');
$ellipse2->setOpacity(0.3);

$polygon = new polygon(200,10, 250,190, 160,210);
$polygon->setPosition(250, 80);

$etoile = new etoile(100,10, 40,198, 190,78, 10,78, 160,198);
$etoile->setPosition(250, 80)

?>

<!DOCTYPE html>
<html>
<!-- <head>
	<meta charset="utf-8">
	<link rel="stylesheet" type="text/css" href="style.css">
	<title></title>
</head>
<body>
	<h1>Painter</h1>
	 
	<svg style="border: 1px solid grey" width="800" height="260">
  		<?= $rect->draw() ?>
  		<?= $rect2->draw() ?>
  		<?= $rect3->draw() ?>
  		<?= $rect4->draw() ?>
  		<?= $rect5->draw() ?>
  		<?= $rect6->draw() ?>
		<?= $circle->draw() ?>
		<?= $circle2->draw() ?>
		<?= $ellipse->draw() ?>
		<?= $ellipse2->draw() ?>
		<?= $polygon->draw() ?>
		<?= $etoile->draw() ?>

	</svg> 

</body>
</html> -->

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" type="text/css" href="style.css">
	<title>Document</title>
</head>
<body>
	<header>
		<a href="#">About-me</a> 
		<a href="#">contact</a>
	</header>
	<main>
		<div class="fixe">
			<nav>
				<a href="#">navigation</a>
				<a href="#">navigation</a>
				<a href="#">navigation</a>
				<a href="#">navigation</a>
			</nav>

		</div>
		<div class="clear"></div>
		<footer>
			<a href="#">About me</a> 
			<a href="#">Contact</a>
		</footer>
		
	</main>
</body>
</html><file_sep>/classes/Circle.php
<?php

class circle {

	public $x = 0;
	public $y = 0;

	public $color;

	public $r;

	public $opacity;

	public function __construct($r) {
		
		$this->color = 'black';
		$this->r = $r;
		$this->opacity = 0.5;

	}

	public function draw() {
		$svg = <<<TXT
	
		<circle cx="{$this->x}" cy="{$this->y}" fill="{$this->color}" r="{$this->r}" opacity="{$this->opacity}"/>
TXT;

		return $svg;
	}

	function setPosition($x, $y) {
		$this->x = $x;
		$this->y = $y;
	}

	function setColor($color) {
		$this->color = $color;
	}


	function setOpacity($opacity) {
		$this->opacity = $opacity;
	}

	

}<file_sep>/classes/Ellipse.php
<?php

class ellipse{

	public $x = 0;
	public $y = 0;



	public $color;

	public $ry;
	public $rx;



	public $opacity;

	public function __construct($rx, $ry) {
		
		$this->color = 'black';
		$this->ry = $ry;
		$this->rx = $rx;
		$this->opacity = 0.5;

	}

	public function draw() {
		$svg = <<<TXT
	
		<ellipse cx="{$this->x}" cy="{$this->y}" fill="{$this->color}" ry="{$this->ry}" rx="{$this->rx}"  opacity="{$this->opacity}"/>
		 
TXT;

		return $svg;
	}

	function setPosition($x, $y) {
		$this->x = $x;
		$this->y = $y;
	}

	function setColor($color) {
		$this->color = $color;
	}


	function setOpacity($opacity) {
		$this->opacity = $opacity;
	}

	

}<file_sep>/classes/polygon.php
<?php
class polygon {

	public $x;
	public $y;
	public $s1;
	public $s2;
	public $s3;
	public $s4;
	public $s5;
	public $s6;
	public $points;
	public $color;

	public function __construct($s1,$s2, $s3,$s4, $s5,$s6) {
		$this->x = 0;
		$this->y = 0;
	    $this->points="$s1,$s2 $s3,$s4 $s5,$s6";
		$this->color = 'black';

		
	}

	public function draw() {
		$svg = <<<TXT
	
		<polygon  points="{$this->points}"  x="{$this->x}" y="{$this->y}" fill="{$this->color}" />
  		
TXT;

		return $svg;
	}

	function setPosition($x, $y) {
		$this->x = $x;
		$this->y = $y;
	}

	function setColor($color) {
		$this->color = $color;
	}

}<file_sep>/classes/triangle.php
<?php
class polygone {

	public $x;
	public $y;
	public $points;
	public $color;

	public function __construct($point) {
		$this->x = 0;
		$this->y = 0;
		$this->points = $points;
		$this->color = 'black';

		
	}

	public function draw() {
		$svg = <<<TXT
	
		<polygon  points="{$this->200,10 250,190 160,210}"   x="{$this->x}" y="{$this->y}" 
  		fill="{$this->color}" />
  		
TXT;

		return $svg;
	}

	function setPosition($x, $y) {
		$this->x = $x;
		$this->y = $y;
	}

	function setColor($color) {
		$this->color = $color;
	}

}