定制 stoffel/console-canvas 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

stoffel/console-canvas

Composer 安装命令:

composer require stoffel/console-canvas

包简介

Helper to draw graphics and compose elements on top of Symfony Console Component

README 文档

README

Helper to draw graphics and compose elements on top of Symfony Console Component.

Example

$ git clone git@github.com:chr-hertel/console-canvas.git
$ cd console-canvas
$ composer install
$ example/rectangles

Installation

$ composer require stoffel/console-canvas

Usage in PHP

use Stoffel\Console\Canvas\CanvasHelper;
use Stoffel\Console\Canvas\Element\Headline;
use Stoffel\Console\Canvas\Element\Image;
use Stoffel\Console\Canvas\Element\Rectangle;
use Stoffel\Console\Canvas\Fill;
use Stoffel\Console\Canvas\Dimension;
use Stoffel\Console\Canvas\Position;

$canvas = CanvasHelper::create($output);
$canvas
    ->setBackground(Fill::withGradient(['#000000', '#999999']))
    ->addElement(new Position(10, 10), new Rectangle(new Dimension(10, 5), Fill::withColor('#FF0000')))
    ->addElement(new Position(50, 5), new Rectangle(new Dimension(20, 5), Fill::withGradient('summer')))
    ->addElement(new Position(100, 5), new Image('/path/to/image.jpg', new Dimension(30, 25)))
    ->addElement(new Position(10, 40), new Headline('Hello World', Fill::withColor('yellow')))
    ->draw();

统计信息

  • 总下载量: 40
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-11-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固