Flash Text Engine (Flash文本引擎)
原文地址:http://www.insideria.com/2009/03/flash-text-engine.html 作者:Veronique Brossier
TextBlock - 用于创建文本块(段落)的集合,不是显示对象
textLine - TextBlock的一行,是显示对象
contentElement - 放入TextBlock的内容(文本TextElement ,图像GraphicElement,文本图像组合GroupElement)
ElementFormat - 定义contentElement的格式
fontDescription - 定义应用与elementFormat的字体的样式
这是一个使用例子:
import flash.text.engine.*;
var fd:FontDescription = new FontDescription();
var ef:ElementFormat = new ElementFormat(fd);
var te:TextElement = new TextElement("Hello world", ef);
var ge:GraphicsElement = new GraphicsElement(shape, shape.width,shape.height,ef);
var v:Vector.<ElementContent> = new Vector.<ElementContent>();
v.push(te,ge);
var group:GroupElement = new GroupElement(v);
var tb:TextBlock = new TextBlock();
tb.content = group;
var tl:TextLine = tb.createTextLine(null, 200);
addChild(tl);
FontDescription
通过fontDescription可以定义字体样式,对于设备字体,可以设置 fontPosture 和 bold fontWeight.对于嵌入字体,利用 CFF 呈现,可通过小尺寸获得高品质的字体呈现.
这段代码显示你计算机中的字体:
import flash.text.Font;
import flash.text.engine.FontDescription;
// 设备字体
var myFonts:Array = Font.enumerateFonts(true);
for (var i:int = 0; i < myFonts.length; i++) {
if (myFonts[i].fontType == "device") {
trace("I am a device font and my name is", myFonts[i].fontName);
}
}
// 嵌入字体
var myEmbeddedFonts:Array = Font.enumerateFonts(false);
var f:Font = myEmbeddedFonts[0];
trace(FontDescription.isFontCompatible(f.fontName, "normal", "normal"));
trace(FontDescription.isFontCompatible(f.fontName, "bold", "normal"));
trace(FontDescription.isFontCompatible(f.fontName, "normal", "italic"));
fontDescription应用于最初的elementFormat对象然后锁定,必须创建fontDescription对象的副本才能够被改变:
import flash.text.engine.*;
import flash.text.Font;
var fd = new FontDescription("PALAT
相关文档:
VB显示透明FLASH效果
演示效果:
代码如下:
公共声明区域
Option Explicit
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetW ......
Beside the different silicon cell design, the most important difference between NAND and NOR Flash is the bus interface. NOR Flash is connected to a address / data bus direct like other memory devices as SRAM etc. NAND Flash uses a multiplexed I/O Interface with some additional control pins. NAND fl ......
"NOR的特点是芯片内执行(XIP, eXecute In Place),这样应用程序可以直接在flash闪存内运行,不必再把代码读到系统RAM中。NOR的传输效率很高,在1~4MB的小容量时具有很高的成本效益,但是很低的写入和擦除速度大大影响了它的性能。
XIP - eXecute In Place,中文常译为,就地执行。指代码可以在当前(存储器中)执行
关于 ......
本来很早就打算开买一个域名、空间架设自己的博客,但是在选来选去中犹豫不决了
1
个月,就在昨天我生日的那天,我顿悟了,干嘛一定要用自己的域名,没有什么名气,没有什么特点,只是记录一下自己的生活,主要的目的还是以下:
1
,期限为
1
年,为的是看看
1
年的坚持写作可以给自己带来什么好处;
2
......
转自:http://www.tutorialized.com/view/tutorial/Install-Ubuntu-10.04-LTS-on-a-USB-Flash-Memory/58358
Since the new release of Ubuntu 10.04 LTS came out i decided to make a
quick guide of how to Install Ubuntu 10.04 LTS on a USB Pendrive.
[While reading this tutorial
remeber some bios may be di ......