コード例 #1
0
ファイル: CropProcessor.php プロジェクト: aoemedia/menta
 public function __construct($x1, $y1 = null, $x2 = null, $y2 = null)
 {
     if ($x1 instanceof \WebDriver\Element) {
         list($x1, $y1, $x2, $y2) = array_values(Menta_Util_Div::getElementCoordinates($x1));
     }
     $this->x1 = $x1;
     $this->y1 = $y1;
     $this->x2 = $x2;
     $this->y2 = $y2;
 }
コード例 #2
0
ファイル: RectangleProcessor.php プロジェクト: aoemedia/menta
 /**
  * Rectangle processor constructor
  *
  * @param int    $x1
  * @param int    $y1
  * @param int    $x2
  * @param int    $y2
  * @param string $color
  * @param bool   $fill
  */
 public function __construct($x1, $y1 = NULL, $x2 = NULL, $y2 = NULL, $color = '#ffffff', $fill = true)
 {
     if ($x1 instanceof \WebDriver\Element) {
         list($x1, $y1, $x2, $y2) = array_values(Menta_Util_Div::getElementCoordinates($x1));
     }
     $this->x1 = $x1;
     $this->y1 = $y1;
     $this->x2 = $x2;
     $this->y2 = $y2;
     $this->color = $color;
     $this->fill = $fill;
 }