Drawing with ASCII art
来源:互联网 发布:淘宝扫二维码别人付款 编辑:程序博客网 时间:2024/05/20 02:25
Have you ever wanted to draw shapes in Cocoa using ASCII art?
NOW YOU CAN!
This simple pair of categories helps you draw the following shapes:
- Rectangles!
- Triangles!
- Even SHAPES WITH NO CORNERS AT ALL!
So you're in a view…
Just send yourself one of these simple messages:
[self drawShapeCenteredAtPoint_PRH:centerPoint sizePerCharacter:(NSSize){ 10.0, 10.0 } //or something drawingMode:kCGPathFill string: @" ^ " @" / \\ " @"+---+"];
or:
[self drawShapeCenteredAtPoint_PRH:centerPoint shapeSize:(NSSize){ 100.0, 100.0 } drawingMode:kCGPathFillStroke lineWidth:3.0 string: @" ⁀ " @"( )" @" ‿ "];
You have your choice of size-per-character or size-for-the-whole-shape, and of whether you specify a line width or not. The default is 1, though the no-line-width version is really only for when you want to fill and not stroke.
So you want a Bézier path…
We've got you covered there, too!
The other category adds two methods. They're basically the same as above, but you only get the choice of how to specify size, since of course you can just set the line width once you have the path.
0 0
- Drawing with ASCII art
- ascii tool - Ascii Art Studio
- [BZOJ3635] [NEERC2006] ASCII Art
- ASCII Art Studio
- Pictures of Ascii Art
- Drawing with Data-D3
- Drawing With A Color
- ascii art的一些资源
- text to ascii art generator
- XART------generate art ascii texts.
- POJ 3148 ASCII Art 笔记
- Drawing Board with AS3.0
- Drawing styled text with Uniscribe
- ASCII Art Studio v 2.2.0
- 用freetype2显示ascii-art中文
- 用freetype2显示ascii-art中文
- 用freetype2显示ascii-art中文
- 牛逼的AA:ASCII-Art
- vmplayer网络配置详解
- C++并发实战15:函数式编程
- C#子线程操作主线程中的控件
- C#设置WinForm快捷键(TextBox格式化,Perfect)
- linux中shell变量$#,$@,$0,$1,$2的含义解释
- Drawing with ASCII art
- 中国版Kindle Paperwhite使用评测
- 有写编译器的冲动?这些资料很重要
- SQL TUNING——从近半小时到几十毫秒的一次优化
- ubuntu(Kubuntu)安装ns3
- Java:重写equals()和hashCode()
- VirtualBox 修改虚拟机分辨率
- 判别模型、生成模型与朴素贝叶斯方法
- http://www.2cto.com/kf/201205/131945.html