~ubuntu-branches/debian/stretch/insubstantial/stretch

« back to all changes in this revision

Viewing changes to flamingo/src/main/resources/org/pushingpixels/flamingo/api/svg/SvgTranscoderTemplatePlain.templ

  • Committer: Package Import Robot
  • Author(s): Felix Natter
  • Date: 2016-01-18 20:58:45 UTC
  • Revision ID: package-import@ubuntu.com-20160118205845-crbmrkda61qsi5qa
Tags: upstream-7.3+dfsg2
ImportĀ upstreamĀ versionĀ 7.3+dfsg2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
TOKEN_PACKAGE
 
2
 
 
3
import java.awt.*;
 
4
import java.awt.geom.*;
 
5
 
 
6
/**
 
7
 * This class has been automatically generated using <a
 
8
 * href="https://flamingo.dev.java.net">Flamingo SVG transcoder</a>.
 
9
 */
 
10
public class TOKEN_CLASSNAME {
 
11
        /**
 
12
         * Paints the transcoded SVG image on the specified graphics context. You
 
13
         * can install a custom transformation on the graphics context to scale the
 
14
         * image.
 
15
         * 
 
16
         * @param g
 
17
         *            Graphics context.
 
18
         */
 
19
        public static void paint(Graphics2D g) {
 
20
        Shape shape = null;
 
21
        Paint paint = null;
 
22
        Stroke stroke = null;
 
23
        
 
24
        float origAlpha = 1.0f;
 
25
        Composite origComposite = ((Graphics2D)g).getComposite();
 
26
        if (origComposite instanceof AlphaComposite) {
 
27
            AlphaComposite origAlphaComposite = 
 
28
                (AlphaComposite)origComposite;
 
29
            if (origAlphaComposite.getRule() == AlphaComposite.SRC_OVER) {
 
30
                origAlpha = origAlphaComposite.getAlpha();
 
31
            }
 
32
        }
 
33
        
 
34
        TOKEN_PAINTING_CODE
 
35
        }
 
36
 
 
37
    /**
 
38
     * Returns the X of the bounding box of the original SVG image.
 
39
     * 
 
40
     * @return The X of the bounding box of the original SVG image.
 
41
     */
 
42
    public static int getOrigX() {
 
43
        return TOKEN_ORIG_X;
 
44
    }
 
45
 
 
46
    /**
 
47
     * Returns the Y of the bounding box of the original SVG image.
 
48
     * 
 
49
     * @return The Y of the bounding box of the original SVG image.
 
50
     */
 
51
    public static int getOrigY() {
 
52
        return TOKEN_ORIG_Y;
 
53
    }
 
54
 
 
55
    /**
 
56
     * Returns the width of the bounding box of the original SVG image.
 
57
     * 
 
58
     * @return The width of the bounding box of the original SVG image.
 
59
     */
 
60
    public static int getOrigWidth() {
 
61
        return TOKEN_ORIG_WIDTH;
 
62
    }
 
63
 
 
64
    /**
 
65
     * Returns the height of the bounding box of the original SVG image.
 
66
     * 
 
67
     * @return The height of the bounding box of the original SVG image.
 
68
     */
 
69
    public static int getOrigHeight() {
 
70
        return TOKEN_ORIG_HEIGHT;
 
71
    }
 
72
}