Skip to content

Commit e104efd

Browse files
author
benni-tec
committed
added dartdocs to color and tests
1 parent f697800 commit e104efd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/tiled/lib/src/common/color.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
part of tiled;
22

3+
/// Basic data class holding a Color in ARGB format.
4+
/// This can be converted to dart:ui's Color using the flame_tiled package
35
class ColorData {
46
static int _sub(int hex, int index) => (hex >> index * 8) & 0x000000ff;
57

@@ -8,7 +10,7 @@ class ColorData {
810
final int blue;
911
final int alpha;
1012

11-
/// Format: aarrggbb
13+
/// Parses the Color from an int using the lower 32-bits and tiled's format: 0xaarrggbb
1214
ColorData.hex(int hex)
1315
: alpha = _sub(hex, 3),
1416
red = _sub(hex, 2),

packages/tiled/test/color.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ void main() {
2222
expect(data.blue, equals(blue));
2323
});
2424
});
25-
}
25+
}

0 commit comments

Comments
 (0)