drawable->position(); foreach ($image as $frame) { // draw background if ($this->drawable->hasBackgroundColor()) { imagealphablending($frame->native(), true); imagesetthickness($frame->native(), 0); imagefilledrectangle( $frame->native(), $position->x(), $position->y(), $position->x() + $this->drawable->width(), $position->y() + $this->drawable->height(), $this->driver()->colorProcessor($image->colorspace())->colorToNative( $this->backgroundColor() ) ); } // draw border if ($this->drawable->hasBorder()) { imagealphablending($frame->native(), true); imagesetthickness($frame->native(), $this->drawable->borderSize()); imagerectangle( $frame->native(), $position->x(), $position->y(), $position->x() + $this->drawable->width(), $position->y() + $this->drawable->height(), $this->driver()->colorProcessor($image->colorspace())->colorToNative( $this->borderColor() ) ); } } return $image; } }