/// <summary> /// Renders text using the style (not finished yet). /// </summary> /// <param name="g"></param> /// <param name="s"></param> /// <param name="x"></param> /// <param name="y"></param> public void render(IRenderer r, string s, int x, int y) { if (shadowOffsets == null) { this.shadowOffsets = OctantsHelper.GetOffsets(this.shadowDir); } //draw the shadow int i; for (i = 0; i < shadowOffsets.Length; i++) { r.DrawString(shadowColour, s, this.font, x + shadowOffsets[i].X, y + shadowOffsets[i].Y); } r.DrawString(textColour, s, this.font, x, y); }
/// <summary> /// Renders text using the style (not finished yet). /// </summary> /// <param name="g"></param> /// <param name="s"></param> /// <param name="x"></param> /// <param name="y"></param> public void render(Graphics g, string s, int x, int y) { if (shadowOffsets == null) { this.shadowOffsets = OctantsHelper.GetOffsets(this.shadowDir); } //draw the shadow int i; for (i = 0; i < shadowOffsets.Length; i++) { g.DrawString(s, this.font, this.generateShadowBrush(), x + shadowOffsets[i].X, y + shadowOffsets[i].Y); } g.DrawString(s, this.font, this.generateBrush(), x, y); }