本文整理汇总了C#中MediaPortal.GUI.Library.TransformMatrix.SetZRotation方法的典型用法代码示例。如果您正苦于以下问题:C# TransformMatrix.SetZRotation方法的具体用法?C# TransformMatrix.SetZRotation怎么用?C# TransformMatrix.SetZRotation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaPortal.GUI.Library.TransformMatrix
的用法示例。
在下文中一共展示了TransformMatrix.SetZRotation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RotateZ
/// <summary>
/// Rotates the control transform matrix by the specified angle (in degrees) around the z-axis.
/// </summary>
public static void RotateZ(float angle, float x, float y)
{
var m = new TransformMatrix();
angle *= DegreeToRadian;
m.SetZRotation(angle, x, y, 1.0f);
UpdateFinalTransform(ControlTransform.multiplyAssign(m));
}
示例2: Draw
public void Draw(float x, float y, float nw, float nh, float zrot, float uoff, float voff, float umax, float vmax,
int color)
{
if (_textureNumber >= 0)
{
// Rotate around the x,y point of the specified rectangle; maintain aspect ratio (1.0f)
TransformMatrix localTransform = new TransformMatrix();
localTransform.SetZRotation(zrot, x, y, 1.0f);
TransformMatrix finalTransform = GUIGraphicsContext.GetFinalTransform();
localTransform = finalTransform.multiply(localTransform);
FontEngineDrawTexture(_textureNumber, x, y, nw, nh, uoff, voff, umax, vmax, color, localTransform.Matrix);
}
else
{
if (logTextures)
{
Log.Info("fontengine:Draw() ERROR. Texture is disposed:{0} {1}", _textureNumber.ToString(), _imageName);
}
}
}
示例3: RotateZ
/// <summary>
/// Rotates the control transform matrix by the specified angle (in degrees) around the z-axis.
/// </summary>
public static void RotateZ(float angle, float x, float y)
{
TransformMatrix m = new TransformMatrix();
angle *= DEGREE_TO_RADIAN;
m.SetZRotation(angle, x, y, 1.0f);
UpdateFinalTransform(ControlTransform.multiplyAssign(m));
}
示例4: Draw
/// <summary>
/// Draw a texture rotated around (x,y) blended with a diffuse texture.
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <param name="nw"></param>
/// <param name="nh"></param>
/// <param name="zrot"></param>
/// <param name="uoff"></param>
/// <param name="voff"></param>
/// <param name="umax"></param>
/// <param name="vmax"></param>
/// <param name="color"></param>
/// <param name="diffuseTextureNo"></param>
/// <param name="uoffd"></param>
/// <param name="voffd"></param>
/// <param name="umaxd"></param>
/// <param name="vmaxd"></param>
public void Draw(float x, float y, float nw, float nh, float zrot, float uoff, float voff,
float umax, float vmax, uint color, int blendableTextureNo, float uoffd,
float voffd, float umaxd, float vmaxd, FontEngineBlendMode blendMode)
{
if (_textureNumber >= 0)
{
// Rotate around the x,y point of the specified rectangle; maintain aspect ratio (1.0f)
TransformMatrix localTransform = new TransformMatrix();
localTransform.SetZRotation(zrot, x, y, 1.0f);
TransformMatrix finalTransform = GUIGraphicsContext.GetFinalTransform();
localTransform = finalTransform.multiply(localTransform);
DXNative.FontEngineDrawTexture2(_textureNumber, x, y, nw, nh, uoff, voff, umax, vmax,
color, localTransform.Matrix,
blendableTextureNo, uoffd, voffd, umaxd, vmaxd,
blendMode);
}
}