易截截图软件、单文件、免安装、纯绿色、仅160KB

Flex的HSV to RGB ,RGB to HSV 算法

/*Copyright (c) 2006 Adobe Systems Incorporated
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
from, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
*/
package qs.utils
{
public class ColorUtils
{
 public static function HSVToRGB(hsv:Object):Number
 {
  var src:Object = hsv;
  var dst:Number
 
  var h:Number,s:Number,v:Number;
 
  h = hsv.h;
  s = hsv.s;
  v = hsv.v;
  
  var i:Number;
  var f:Number, p:Number, q:Number, t:Number;
  var r:Number,g:Number,b:Number;
  if( s == 0 ) {
   // achromatic (grey)
   v = Math.floor(v*255);
   dst = (v << 16) + (v << 8) + v;
   return dst;
  }
  h /= 60;   // sector 0 to 5
  i = Math.floor( h );
  f = h - i;   // factorial part of h
  p = v * ( 1 - s );
  q = v * ( 1 - s * f );
  


相关文档:

Flex中的Label实现鼠标手型及下划线

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="vertical">
 <mx:Script>
  <![CDATA[
   import mx.controls.dataGridClasses.DataGridListData;
   imp ......

关于Flex SDK 3.5.0 中ComboBox二级联动问题

今天下午发现一个关于Flex SDK 3.5.0中ComboBox的bug,还真是费了不少时间。因为我还是头一次发现自己解决不了的问题,有一种可能是平台或框架的问题。特此记录。
问题描述:做了一个关于ComboBox的二级联动,一直就存在问题,由于之前主体功能没有完成,也没细心下来排查。在一级下拉选择后,在二级中的ArrayCollection或 ......

Flex Builder 3.0 For Eclipse 3.3 安装方法[转]

Flex Builder 3.0 For Eclipse 3.3 安装方法
Flex Builder 3.0 For Eclipse 3.3 安装方法
  这两天准备学习Flex,于是下载了Flex Builder 3.0 For Eclipse plugin准备安装.
但是安装后启动Eclipse,找了半天也没找到Flex.而且Flex Builder会把JRE也安装.觉得这样很不爽.
所以我想到能不能来个Flex Builder绿色安装方 ......

flex 拖拽,指定拖拽代理,由一个容器拖放到另一个里

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
<mx:Script>
<![CDATA[
import mx.core.BitmapAsset;
import mx.core.DragSource;
import mx.events.DragEvent;
import mx.managers.DragManager;
private var xoffset:Number;
private var yoffset:Number;
priv ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号