- ui.bg_apply_all_pages = FALSE;
-
- ui.cur_brush = &(ui.brushes[0][TOOL_PEN]);
- ui.toolno[0] = TOOL_PEN;
- for (i=1; i<=NUM_BUTTONS; i++) ui.toolno[i] = TOOL_ERASER;
- for (i=0; i<=NUM_BUTTONS; i++) {
- ui.ruler[i] = FALSE;
- ui.linked_brush[i] = BRUSH_LINKED;
- }
- ui.brushes[0][TOOL_PEN].color_no = COLOR_BLACK;
- ui.brushes[0][TOOL_ERASER].color_no = COLOR_WHITE;
- ui.brushes[0][TOOL_HIGHLIGHTER].color_no = COLOR_YELLOW;
- for (i=0; i < NUM_STROKE_TOOLS; i++) {
- b = &(ui.brushes[0][i]);
- b->tool_type = i;
- b->color_rgba = predef_colors_rgba[b->color_no];
- if (i == TOOL_HIGHLIGHTER) {
- b->color_rgba &= HILITER_ALPHA_MASK;
+
+ ui.cur_brush = &(ui.brushes[0][ui.toolno[0]]);
+ for (j=0; j<=NUM_BUTTONS; j++)
+ for (i=0; i < NUM_STROKE_TOOLS; i++) {
+ b = &(ui.brushes[j][i]);
+ b->tool_type = i;
+ b->color_rgba = predef_colors_rgba[b->color_no];
+ if (i == TOOL_HIGHLIGHTER) {
+ b->color_rgba &= HILITER_ALPHA_MASK;
+ }
+ b->thickness = predef_thickness[i][b->thickness_no];