예제 #1
0
        private void transformImpl(System.Drawing.Drawing2D.Matrix m)
        {
            SceneTransform st = new SceneTransform(m);

            state.scene.add(st);
            state.scene = st;
            //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"'
            state.transform.Multiply(m, System.Drawing.Drawing2D.MatrixOrder.Append);
        }
예제 #2
0
        /// <summary> Adds a scene node to the scene at the given point.
        ///
        /// </summary>
        /// <param name="node">the scene node top be added
        /// </param>
        /// <param name="x">x coordinate of the point
        /// </param>
        /// <param name="y">y coordinate of the point
        /// </param>
        public virtual void add(SceneNode node, double x, double y)
        {
            System.Drawing.Drawing2D.Matrix temp_Matrix;
            temp_Matrix = new System.Drawing.Drawing2D.Matrix();
            temp_Matrix.Translate((float)x, (float)y);
            SceneTransform s = new SceneTransform(temp_Matrix);

            s.add(node);
            state.scene.add(s);
        }
예제 #3
0
        /// <summary> Draws the given glyphs using the current font, Fill color and
        /// other settings. The positions of the glyphs are given
        /// as an array of floats. Each position is given as two
        /// numbers the x-position and y-position.
        ///
        /// </summary>
        /// <param name="glyphCodes">the glyph codes.
        /// </param>
        /// <param name="positions">the positions of the characters.
        /// </param>
        public virtual void drawGlyphs(int[] glyphCodes, float[] positions)
        {
            System.Drawing.Drawing2D.Matrix temp_Matrix;
            temp_Matrix = new System.Drawing.Drawing2D.Matrix();
            temp_Matrix.Translate((float)state.textPosition[0], (float)state.textPosition[1]);
            SceneTransform st        = new SceneTransform(temp_Matrix);
            TextShape      textShape = new TextShape(state.font, glyphCodes, positions);

            state.scene.add(st);

            if (state.fillColor != null)
            {
                textShape.Color = state.fillColor;
                st.add(textShape);
            }
            else
            {
                SceneClip sc = new SceneClip(textShape);

                sc.add(state.fillBrush);
                st.add(sc);
            }
        }