PHP code example of riley19280 / miro-clipboard
1. Go to this page and download the library: Download riley19280/miro-clipboard library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
riley19280 / miro-clipboard example snippets
MiroClipboardData::make()
->addObject(MiroWidget::make()->shape(ShapeType::Circle))
->toHtml();
MiroWidget::make()
->shape(ShapeType::Star)
->text('Hello!')
->scale(.5)
->relativeScale(.5)
->rotation(90)
->relativeRotation(90)
->offsetPosition(50, 50)
->position(50, 50)
->size(50, 50)
->style(fn(MiroShapeStyle $style) => $style
->backgroundColor(16711680)->backgroundColor('#FF0000')
->backgroundOpacity(.5)
->borderColor(16711680)->borderColor('#FF0000')
->borderThickness(5)
->borderOpacity(.5)
->borderStyle(BorderStyle::DashLong)
->fontFamily('Arial')
->textColor(16711680)->textColor('#FF0000')
->textAlign(TextAlign::Left, VerticalTextAlign::Top)
->fontSize(11)
->bold()
->italic()
->underline()
->strikethrough()
);
MiroWidget::make()
->line()
->addText(
MiroLineText::make('Hello', .5, .5)
->color('#FF0000')
->color(16711680)
->rotated()
->fontSize(11)
->width(50)
)
->setPoints([
['x' => 111.0, 'y' => 111.0],
['x' => 123.0, 'y' => 123.0],
['x' => 456.0, 'y' => 456.0],
['x' => 500.0, 'y' => 500.0],
])
->style(fn(MiroLineStyle $style) => $style
->jump()
->type(LineType::Square)
->strokeWeight(4)
->color('#FF0000')
->color(16711680)
->startingLinecap(LineCap::Circle)
->endingLinecap(LineCap::CircleFilled)
->pattern(LinePattern::Dotted)
);
$clipboardData = MiroClipboardData::parse('<your clipboard string>');