当前位置: 首页>>代码示例>>C#>>正文


C# TransformMatrix.SetZRotation方法代码示例

本文整理汇总了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));
 }
开发者ID:doskabouter,项目名称:MediaPortal-1,代码行数:10,代码来源:GraphicContext.cs

示例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);
          }
        }
      }
开发者ID:npcomplete111,项目名称:MediaPortal-1,代码行数:21,代码来源:CachedTexture.cs

示例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));
 }
开发者ID:nio22,项目名称:MediaPortal-1,代码行数:10,代码来源:GraphicContext.cs

示例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);
      }
    }
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:36,代码来源:TextureFrame.cs


注:本文中的MediaPortal.GUI.Library.TransformMatrix.SetZRotation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。