浏览代码

Added Color ctor for vec4f.

Mark Sibly 8 年之前
父节点
当前提交
9f11817ffe
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      modules/std/graphics/color.monkey2

+ 7 - 0
modules/std/graphics/color.monkey2

@@ -186,6 +186,13 @@ Namespace std.graphics
 		Self.a=a
 	End
 	
+	Method New( v:geom.Vec4f )
+		Self.r=v.x
+		Self.g=v.y
+		Self.b=v.z
+		Self.a=v.w
+	End
+	
 	#rem monkeydoc Converts the color to a printable string.
 	#end
 	Operator To:String()