/// <summary> /// Sets the named property to the given value. /// </summary> /// <param name="index">Index of the property</param> /// <param name="value">Value of the property</param> /// <unmanaged>HRESULT ID2D1Properties::SetValue([In] const wchar_t* name,[In] D2D1_PROPERTY_TYPE type,[In, Buffer] const void* data,[In] unsigned int dataSize)</unmanaged> public unsafe void SetValue(int index, RawColor3 value) { SetValue(index, PropertyType.Vector3, new IntPtr(&value), sizeof(RawColor3)); }
/// <summary> /// Function to convert a SharpDX raw color 3 type to a <see cref="GorgonColor"/>. /// </summary> /// <param name="color">The SharpDX raw color 3 type to convert.</param> /// <returns>A new <see cref="GorgonColor"/>.</returns> public static GorgonColor ToGorgonColor(this RawColor3 color) => new GorgonColor(color.R, color.G, color.B, 1.0f);
/// <summary> /// Sets the named property to the given value. /// </summary> /// <param name="name">Name of the property</param> /// <param name="value">Value of the property</param> /// <unmanaged>HRESULT ID2D1Properties::SetValueByName([In] const wchar_t* name,[In] D2D1_PROPERTY_TYPE type,[In, Buffer] const void* data,[In] unsigned int dataSize)</unmanaged> public unsafe void SetValueByName(string name, RawColor3 value) { SetValueByName(name, PropertyType.Vector3, new IntPtr(&value), sizeof(RawColor3)); }
public Vertex(RawVector3 position, RawColor3 color) { Position = position; Color = color; }