/// <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); }
/// <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); } }