digraph {
rankdir=LR;
node [shape=plaintext];
subgraph cluster__gimp_brush {
label="GimpBrush";
graph[style=dotted];
gimp_brush__seq [label=<
pos | size | type | id |
0 | 4 | u4be | len_header |
4 | (len_header - 4) | Header | header |
>];
gimp_brush__inst__len_body [label=<
id | value |
len_body | ((header.width * header.height) * I__COLOR_DEPTH[header.bytes_per_pixel]) |
>];
gimp_brush__inst__body [label=<
pos | size | type | id |
len_header | len_body | | body |
>];
subgraph cluster__header {
label="GimpBrush::Header";
graph[style=dotted];
header__seq [label=<
pos | size | type | id |
0 | 4 | u4be | version |
4 | 4 | u4be | width |
8 | 4 | u4be | height |
12 | 4 | u4be→ColorDepth | bytes_per_pixel |
16 | 4 | | magic |
20 | 4 | u4be | spacing |
24 | ⇲ | str(UTF-8) | brush_name |
>];
}
subgraph cluster__bitmap {
label="GimpBrush::Bitmap";
graph[style=dotted];
bitmap__seq [label=<
pos | size | type | id |
0 | ... | Row | rows |
repeat _root.header.height times |
>];
}
subgraph cluster__row {
label="GimpBrush::Row";
graph[style=dotted];
row__seq [label=<
pos | size | type | id |
0 | ... | switch (_root.header.bytes_per_pixel) | pixels |
repeat _root.header.width times |
>];
row__seq_pixels_switch [label=<
case | type |
:color_depth_grayscale | PixelGray |
:color_depth_rgba | PixelRgba |
>];
subgraph cluster__pixel_gray {
label="GimpBrush::Row::PixelGray";
graph[style=dotted];
pixel_gray__seq [label=<>];
pixel_gray__inst__red [label=<>];
pixel_gray__inst__green [label=<>];
pixel_gray__inst__blue [label=<>];
pixel_gray__inst__alpha [label=<>];
}
subgraph cluster__pixel_rgba {
label="GimpBrush::Row::PixelRgba";
graph[style=dotted];
pixel_rgba__seq [label=<
pos | size | type | id |
0 | 1 | u1 | red |
1 | 1 | u1 | green |
2 | 1 | u1 | blue |
3 | 1 | u1 | alpha |
>];
}
}
}
gimp_brush__seq:len_header_type -> gimp_brush__seq:header_size [color="#404040"];
gimp_brush__seq:len_header_type -> gimp_brush__seq:header_size [color="#404040"];
gimp_brush__seq:header_type -> header__seq [style=bold];
header__seq:width_type -> gimp_brush__inst__len_body [color="#404040"];
header__seq:height_type -> gimp_brush__inst__len_body [color="#404040"];
header__seq:bytes_per_pixel_type -> gimp_brush__inst__len_body [color="#404040"];
gimp_brush__seq:len_header_type -> gimp_brush__inst__body:body_pos [color="#404040"];
gimp_brush__inst__len_body:len_body_type -> gimp_brush__inst__body:body_size [color="#404040"];
bitmap__seq:rows_type -> row__seq [style=bold];
header__seq:height_type -> bitmap__seq:rows__repeat [color="#404040"];
row__seq:pixels_type -> row__seq_pixels_switch [style=bold];
row__seq_pixels_switch:case0 -> pixel_gray__seq [style=bold];
row__seq_pixels_switch:case1 -> pixel_rgba__seq [style=bold];
header__seq:bytes_per_pixel_type -> row__seq:pixels_type [color="#404040"];
header__seq:width_type -> row__seq:pixels__repeat [color="#404040"];
pixel_gray__seq:gray_type -> pixel_gray__inst__alpha [color="#404040"];
}