private SceneNode createNode(SceneShape shape, ScenicColor color, SceneNode brush) { if (color != null) { shape.Color = color; return(shape); } else { SceneClip sc = new SceneClip(shape); sc.add(brush); return(sc); } }
/// <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); } }