Re: [OpenMap Users] Matting paint in OMGraphic

From: Don Dietrick <dietrick_at_bbn.com>
Date: Fri, 19 May 2006 13:54:47 -0400

Thanks for the update, it's in the codebase now for the next relelase.

- Don

On May 11, 2006, at 5:45 AM, Stéphane Wasserhardt wrote:

> Hello all !
>
> Here is a new version of OMGraphic.render(Graphics) :
>
> public void render(Graphics g) {
>
> if (matted) {
> if (g instanceof Graphics2D && stroke instanceof
> BasicStroke) {
> BasicStroke basicStroke = (BasicStroke) stroke;
> ((Graphics2D) g).setStroke(new
> BasicStroke(
>
> basicStroke.getLineWidth() + 2f,
>
> basicStroke.getEndCap(),
>
> basicStroke.getLineJoin()
> ));
> setGraphicsColor(g, mattingPaint);
> draw(g);
> }
> }
>
> if (shouldRenderFill()) {
> setGraphicsForFill(g);
> fill(g);
>
> if (textureMask != null && textureMask != fillPaint) {
> setGraphicsColor(g, textureMask);
> fill(g);
> }
> }
>
> if (shouldRenderEdge()) {
> setGraphicsForEdge(g);
> draw(g);
> }
>
> renderLabel(g);
> }
>
> The only modification is that matting paint now uses the stroke's
> "EndCap" and "LineJoin" values. It is a small improvement, but it
> is an improvement :)
>
> I hope it will be included in the next OpenMap release !
>
> Stephane
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri May 19 2006 - 13:55:47 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT