Rounded Image
来源:互联网 发布:python 性能测试框架 编辑:程序博客网 时间:2024/05/22 07:50
Usage:
<RoundedImage source="someImage.jpg" width="250" height="250" cornerRadius="15"/>Source:
package com.brian
{
import mx.controls.Image;
import mx.core.UIComponent;
/**
* Rounded Image
*
* Extended Image component to allow rounded corners by using a mask
*
* @author Brian Raymes
*/
public class RoundedImage extends Image
{
protected var roundedMask:UIComponent;
protected var cornerRad:int;
public function RoundedImage()
{
super();
}
public function get cornerRadius():int
{
return cornerRad;
}
public function set cornerRadius(radius:int):void
{
cornerRad = radius;
}
override protected function createChildren():void
{
super.createChildren();
this.roundedMask = new UIComponent();
this.addChild(roundedMask);
}
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
roundedMask.graphics.clear();
roundedMask.graphics.beginFill(0x000000);
roundedMask.graphics.drawRoundRectComplex(0, 0, unscaledWidth, unscaledHeight, cornerRad, cornerRad, cornerRad, cornerRad);
roundedMask.graphics.endFill();
this.mask = roundedMask;
}
}
}
- Rounded Image
- [Java FX 2] Stage with rounded corners and background image
- Rounded Numbers
- NSWindow with rounded corners
- Rounded Corner Test
- NiftyCube Rounded Corners Tutorial
- An Experiment in Rounded Corners
- create rounded corners with CSS
- Glide库加载rounded图片
- Rounded corner bitmaps on Android
- 25 Rounded Corners Techniques with CSS
- Border-radius: create rounded corners with CSS!
- IE8 Rounded Corners (With No Images)
- Image
- Image
- Image
- Image
- image
- 创建窗口
- 字符串转化数字算法(C#)
- 为什么会出现you cannot close the workspace while a build is in progress?
- winform 控件 命名规则
- table control 排序
- Rounded Image
- 在Unix环境下mount ISO文件
- ASP.NET存储过程自定义分页详解
- HP-UX上一步步配置NTP
- linux乱码的解决方法
- Hadoop 本地源码开发环境搭建
- LVM操作在HP-UX和AIX上的区别
- sap mail express
- VMware如何装VMware-Tools