• R/O
  • SSH
  • HTTPS

copper: コミット


コミットメタ情報

リビジョン1623 (tree)
日時2022-05-02 17:35:21
作者miyabe

ログメッセージ

(メッセージはありません)

変更サマリ

差分

--- copper/trunk/homare/src/main/java/jp/cssj/homare/css/util/ColorValueUtils.java (revision 1622)
+++ copper/trunk/homare/src/main/java/jp/cssj/homare/css/util/ColorValueUtils.java (revision 1623)
@@ -36,7 +36,7 @@
3636 /**
3737 * The 'black' RGB color.
3838 */
39- public static final ColorValue BLACK = new GrayColorValue(0);
39+ public static final ColorValue BLACK = fromGrayValue(0);
4040
4141 /**
4242 * The 'blue' RGB color.
@@ -56,7 +56,7 @@
5656 /**
5757 * The 'gray' RGB color.
5858 */
59- public static final ColorValue GRAY = new GrayColorValue(0.5f);
59+ public static final ColorValue GRAY = fromGrayValue(0.5f);
6060
6161 /**
6262 * The 'lime' RGB color.
@@ -91,7 +91,7 @@
9191 /**
9292 * The 'silver' RGB color.
9393 */
94- public static final ColorValue SILVER = new GrayColorValue(192f / 255f);
94+ public static final ColorValue SILVER = fromGrayValue(192f / 255f);
9595
9696 /**
9797 * The 'teal' RGB color.
@@ -101,7 +101,7 @@
101101 /**
102102 * The 'white' RGB color.
103103 */
104- public static final ColorValue WHITE = new GrayColorValue(255f);
104+ public static final ColorValue WHITE = fromGrayValue(255f);
105105
106106 /**
107107 * The 'yellow' RGB color.
@@ -217,7 +217,7 @@
217217 /**
218218 * The 'darkgray' RGB color.
219219 */
220- public static final ColorValue DARKGRAY = new GrayColorValue(169f / 255f);
220+ public static final ColorValue DARKGRAY = fromGrayValue(169f / 255f);
221221
222222 /**
223223 * The 'darkgreen' RGB color.
@@ -307,7 +307,7 @@
307307 /**
308308 * The 'dimgray' RGB color.
309309 */
310- public static final ColorValue DIMGRAY = new GrayColorValue(105f / 255f);
310+ public static final ColorValue DIMGRAY = fromGrayValue(105f / 255f);
311311
312312 /**
313313 * The 'dimgrey' RGB color.
@@ -437,7 +437,7 @@
437437 /**
438438 * The 'lightgray' RGB color.
439439 */
440- public static final ColorValue LIGHTGRAY = new GrayColorValue(211f / 255f);
440+ public static final ColorValue LIGHTGRAY = fromGrayValue(211f / 255f);
441441
442442 /**
443443 * The 'lightgreen' RGB color.
@@ -1025,6 +1025,10 @@
10251025 (float) black / 255f);
10261026 }
10271027
1028+ public static ColorValue fromGrayValue(float g) {
1029+ return new GrayColorValue(g);
1030+ }
1031+
10281032 public static ColorValue parseRGBHexColor(String color) {
10291033 int r, g, b;
10301034 try {
--- copper/trunk/homare/src/main/java/jp/cssj/homare/css/value/PaintValue.java (nonexistent)
+++ copper/trunk/homare/src/main/java/jp/cssj/homare/css/value/PaintValue.java (revision 1623)
@@ -0,0 +1,23 @@
1+package jp.cssj.homare.css.value;
2+
3+import jp.cssj.sakae.gc.paint.Paint;
4+
5+/**
6+ * @author MIYABE Tatsuhiko
7+ * @version $Id: ColorValue.java 1552 2018-04-26 01:43:24Z miyabe $
8+ */
9+public class PaintValue implements Value {
10+ protected final Paint paint;
11+
12+ public PaintValue(Paint paint) {
13+ this.paint = paint;
14+ }
15+
16+ public Paint getPaint() {
17+ return this.paint;
18+ }
19+
20+ public short getValueType() {
21+ return Value.TYPE_COLOR;
22+ }
23+}
\ No newline at end of file
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
--- copper/trunk/homare/src/main/java/jp/cssj/homare/style/box/params/Background.java (revision 1622)
+++ copper/trunk/homare/src/main/java/jp/cssj/homare/style/box/params/Background.java (revision 1623)
@@ -287,8 +287,8 @@
287287 throw new IllegalStateException();
288288 }
289289 }
290- gc.end();
291290 }
291+ gc.end();
292292 }
293293
294294 /**
旧リポジトリブラウザで表示