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


C# System.Drawing.Drawing2D.Matrix.setTransform方法代码示例

本文整理汇总了C#中System.Drawing.Drawing2D.Matrix.setTransform方法的典型用法代码示例。如果您正苦于以下问题:C# System.Drawing.Drawing2D.Matrix.setTransform方法的具体用法?C# System.Drawing.Drawing2D.Matrix.setTransform怎么用?C# System.Drawing.Drawing2D.Matrix.setTransform使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Drawing.Drawing2D.Matrix的用法示例。


在下文中一共展示了System.Drawing.Drawing2D.Matrix.setTransform方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: drawUsingPolygon

        private void drawUsingPolygon(DrawContext context, System.Drawing.Drawing2D.Matrix transform, ScenicColor color)
        {
            #if PENDING
            if (glyphPolygons == null)
            {
                glyphPolygons = new FilledPath[glyphCodes.Length];
                for (int i = 0; i < glyphCodes.Length; i++)
                {
                    System.Drawing.Drawing2D.Matrix temp_Matrix;
                    temp_Matrix = new System.Drawing.Drawing2D.Matrix();
                    temp_Matrix.Translate((float) positions[i * 2], (float) positions[i * 2 + 1]);
                    System.Drawing.Drawing2D.Matrix at = temp_Matrix;
                    //UPGRADE_TODO: Interface 'java.awt.Shape' was converted to 'System.Drawing.Drawing2D.GraphicsPath' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_3"'
                    System.Drawing.Drawing2D.GraphicsPath shape = TextRenderer.getGlyphOutline(font, at, glyphCodes[i]);
                    Path path = new AWTShapePath(shape);

                    glyphPolygons[i] = new FilledPath(path);
                }
            }

            System.Drawing.Drawing2D.Matrix temp = new System.Drawing.Drawing2D.Matrix();

            for (int i = 0; i < glyphPolygons.Length; i++)
            {
                System.Drawing.Drawing2D.Matrix temp_Matrix2;
                temp_Matrix2 = new System.Drawing.Drawing2D.Matrix();
                temp_Matrix2.Translate((float) positions[i * 2], (float) positions[i * 2 + 1]);
                System.Drawing.Drawing2D.Matrix at = temp_Matrix2;

                //UPGRADE_ISSUE: Method 'java.awt.geom.AffineTransform.setTransform' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtgeomAffineTransformsetTransform_javaawtgeomAffineTransform_3"'
                temp.setTransform(transform);
                //UPGRADE_TODO: Method 'java.awt.geom.AffineTransform.concatenate' was converted to 'System.Drawing.Drawing2D.Matrix.Multiply' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_javaawtgeomAffineTransformconcatenate_javaawtgeomAffineTransform_3"'
                temp.Multiply(at, System.Drawing.Drawing2D.MatrixOrder.Append);
                glyphPolygons[i].draw(context, temp, color);
            }
            #endif
        }
开发者ID:agustinsantos,项目名称:mogregis3d,代码行数:37,代码来源:TextShape.cs


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