Oval

This document is about how to set up and use a Oval object.

First steps

Ovals behave completely like Rectangles. The only difference is that they have round shapes instead of edges.

Set up an Oval object and add it to a page object like that:

<?php 

use IDML\Content\Oval;

$oval = new Oval();

$page->addElement($oval);

If you want to set your own unique identifier, set up the Oval like that: new Oval('UniqueName');

Size and Position

Add a size and a position like that:

<?php

$oval
    ->setSize(100, 200)
    ->setPosition(10, 10)
;

Add Unit::MILLIMETERS() as third parameter of each method if you prefer numbers in millimeters.

Adding an image

To add an image you need to set up an Image object and add it then:

<?php

$oval->setImage($image);