(empty log message)
@@ -9,7 +9,7 @@ | ||
9 | 9 | <groupId>net.zamasoft</groupId> |
10 | 10 | <artifactId>homare</artifactId> |
11 | 11 | <packaging>jar</packaging> |
12 | - <version>3.2.16</version> | |
12 | + <version>3.2.17</version> | |
13 | 13 | <name>Homare</name> |
14 | 14 | <description>印刷向けのHTML/CSSレンダリングエンジンです。</description> |
15 | 15 | <url>https://copper.osdn.jp/homare/</url> |
@@ -9,7 +9,7 @@ | ||
9 | 9 | * @author MIYABE Tatsuhiko |
10 | 10 | * @version $Id$ |
11 | 11 | */ |
12 | -public class ColorValue implements PaintValue { | |
12 | +public class ColorValue implements PaintValue, Color { | |
13 | 13 | protected final Color color; |
14 | 14 | |
15 | 15 | public ColorValue(Color color) { |
@@ -27,7 +27,34 @@ | ||
27 | 27 | public final short getValueType() { |
28 | 28 | return Value.TYPE_COLOR; |
29 | 29 | } |
30 | - | |
30 | + public short getPaintType() { | |
31 | + return this.color.getPaintType(); | |
32 | + } | |
33 | + | |
34 | + public short getColorType() { | |
35 | + return this.color.getColorType(); | |
36 | + } | |
37 | + | |
38 | + public float getRed() { | |
39 | + return this.color.getRed(); | |
40 | + } | |
41 | + | |
42 | + public float getGreen() { | |
43 | + return this.color.getGreen(); | |
44 | + } | |
45 | + | |
46 | + public float getBlue() { | |
47 | + return this.color.getBlue(); | |
48 | + } | |
49 | + | |
50 | + public float getAlpha() { | |
51 | + return this.color.getAlpha(); | |
52 | + } | |
53 | + | |
54 | + public float getComponent(int i) { | |
55 | + return this.color.getComponent(i); | |
56 | + } | |
57 | + | |
31 | 58 | public boolean equals(Object o) { |
32 | 59 | if (o instanceof ColorValue) { |
33 | 60 | return ((ColorValue)o).getColor().equals(this.color); |
@@ -1,13 +1,19 @@ | ||
1 | 1 | package jp.cssj.homare.impl.css.lang; |
2 | 2 | |
3 | -import jp.cssj.sakae.gc.text.hyphenation.Hyphenation; | |
3 | +import jp.cssj.sakae.gc.text.hyphenation.impl.JapaneseHyphenation; | |
4 | 4 | |
5 | -public class BreakAllHyphenation implements Hyphenation { | |
5 | +public class BreakAllHyphenation extends JapaneseHyphenation { | |
6 | 6 | public boolean atomic(char c1, char c2) { |
7 | + if (this.isCJK(c1) && this.isCJK(c2)) { | |
8 | + return super.atomic(c1, c2); | |
9 | + } | |
7 | 10 | return false; |
8 | 11 | } |
9 | - | |
12 | + | |
10 | 13 | public boolean canSeparate(char c1, char c2) { |
14 | + if (this.isCJK(c1) && this.isCJK(c2)) { | |
15 | + return super.canSeparate(c1, c2); | |
16 | + } | |
11 | 17 | return true; |
12 | 18 | } |
13 | 19 |
@@ -64,7 +64,7 @@ | ||
64 | 64 | |
65 | 65 | gc.setLineWidth(3.0); |
66 | 66 | gc.setLinePattern(GC.STROKE_SOLID); |
67 | - gc.setStrokePaint(ColorValueUtils.RED); | |
67 | + gc.setStrokePaint(ColorValueUtils.RED.getColor()); | |
68 | 68 | |
69 | 69 | path.reset(); |
70 | 70 | path.moveTo(x + 5f, y + 5f); |
@@ -43,8 +43,8 @@ | ||
43 | 43 | path.lineTo(12, 2); |
44 | 44 | Shape check = path; |
45 | 45 | |
46 | - gc.setFillPaint(this.disabled ? ColorValueUtils.LIGHTGRAY : ColorValueUtils.WHITE); | |
47 | - gc.setStrokePaint(this.disabled ? ColorValueUtils.DIMGRAY : ColorValueUtils.BLACK); | |
46 | + gc.setFillPaint((this.disabled ? ColorValueUtils.LIGHTGRAY : ColorValueUtils.WHITE).getColor()); | |
47 | + gc.setStrokePaint((this.disabled ? ColorValueUtils.DIMGRAY : ColorValueUtils.BLACK).getColor()); | |
48 | 48 | gc.setLineWidth(1.0); |
49 | 49 | gc.setLinePattern(GC.STROKE_SOLID); |
50 | 50 | gc.fillDraw(frame); |
@@ -38,14 +38,14 @@ | ||
38 | 38 | Shape frame = new Ellipse2D.Double(2, 2, 8, 8); |
39 | 39 | Shape check = new Ellipse2D.Double(4, 4, 4, 4); |
40 | 40 | |
41 | - gc.setFillPaint(this.disabled ? ColorValueUtils.LIGHTGRAY : ColorValueUtils.WHITE); | |
42 | - gc.setStrokePaint(this.disabled ? ColorValueUtils.DIMGRAY : ColorValueUtils.BLACK); | |
41 | + gc.setFillPaint((this.disabled ? ColorValueUtils.LIGHTGRAY : ColorValueUtils.WHITE).getColor()); | |
42 | + gc.setStrokePaint((this.disabled ? ColorValueUtils.DIMGRAY : ColorValueUtils.BLACK).getColor()); | |
43 | 43 | gc.setLineWidth(1.0); |
44 | 44 | gc.setLinePattern(GC.STROKE_SOLID); |
45 | 45 | gc.fillDraw(frame); |
46 | 46 | |
47 | 47 | if (this.checked) { |
48 | - gc.setFillPaint(this.disabled ? ColorValueUtils.DIMGRAY : ColorValueUtils.BLACK); | |
48 | + gc.setFillPaint((this.disabled ? ColorValueUtils.DIMGRAY : ColorValueUtils.BLACK).getColor()); | |
49 | 49 | gc.fill(check); |
50 | 50 | } |
51 | 51 |
@@ -69,17 +69,17 @@ | ||
69 | 69 | downShadow = path; |
70 | 70 | } |
71 | 71 | |
72 | - gc.setFillPaint(ColorValueUtils.LIGHTGRAY); | |
72 | + gc.setFillPaint(ColorValueUtils.LIGHTGRAY.getColor()); | |
73 | 73 | gc.fill(frame); |
74 | 74 | |
75 | 75 | gc.fill(upFrame); |
76 | - gc.setFillPaint(this.disabled ? ColorValueUtils.DIMGRAY : ColorValueUtils.BLACK); | |
76 | + gc.setFillPaint((this.disabled ? ColorValueUtils.DIMGRAY : ColorValueUtils.BLACK).getColor()); | |
77 | 77 | gc.fill(up); |
78 | 78 | gc.draw(upShadow); |
79 | 79 | |
80 | - gc.setFillPaint(ColorValueUtils.LIGHTGRAY); | |
80 | + gc.setFillPaint(ColorValueUtils.LIGHTGRAY.getColor()); | |
81 | 81 | gc.fill(downFrame); |
82 | - gc.setFillPaint(this.disabled ? ColorValueUtils.DIMGRAY : ColorValueUtils.BLACK); | |
82 | + gc.setFillPaint((this.disabled ? ColorValueUtils.DIMGRAY : ColorValueUtils.BLACK).getColor()); | |
83 | 83 | gc.fill(down); |
84 | 84 | gc.draw(downShadow); |
85 | 85 |