Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Cleanup commenting. | 445aea4a5115c9110a097bfc7ac9f7d5ad48a9e7 | Jan Allersma | 2018-11-02 14:33:08 |
Show Ornaments on Canvas. | d8456f15d69550c4cb0aa615cccb96b45a77f6a6 | Jan Allersma | 2018-11-02 14:08:47 |
Support Entities for Create & Destruct commands. | cc900579eedf9c6288ce1c1883122856794e05a0 | Jan Allersma | 2018-11-02 13:25:43 |
Use entities instead of shapes when constructing ornaments. | 13f08847624489f60a37db55c2aedbba6b021f98 | Jan Allersma | 2018-11-01 17:02:47 |
Remove obsolete 'calcBounds' function. | 475ec330736b5800d12d091415480b163dd244e2 | Jan Allersma | 2018-11-01 14:28:29 |
Setup for decorator pattern. | 762914dec31b1fb1d4cf6bb0cef2e148010652a4 | Jan Allersma | 2018-11-01 14:12:51 |
Revert commit '5678eb6'. | 6225242719b2cfc5ee0de9f8d05edbc7a69007a7 | Jan Allersma | 2018-11-01 14:10:27 |
Make groups movable and resizable. | 1ca7c18ab103a8d1055b27f63192038fd75aef3e | Jan Allersma | 2018-10-17 14:51:32 |
Use translations instead of positions for moving shapes. | 9551c7d2608f01c3950743fd97bd217aab8f5766 | Jan Allersma | 2018-10-16 16:11:03 |
Implement Visitor pattern for Groups. | bd30477ce616362d3f58cef072d1ebc78077fa85 | Jan Allersma | 2018-10-16 13:28:37 |
Implement Visitor pattern for Shapes. | e52412c3059c1ee5fa9abdf4a32db0f47981eee1 | Jan Allersma | 2018-10-16 12:43:17 |
Setup 'Decorator' and 'Ornament' class. | 5678eb6257bcf88502078d08395a394a1c24568b | Jan Allersma | 2018-10-09 09:29:50 |
Use different strats instead of seperate Shapes. | a56e1e665a0292d15139eddfd8ebdeb8c95251b4 | Jan Allersma | 2018-10-01 11:37:45 |
Make ornament interface compatible with Entities. | 21383d5f200a338f8255d7d33b6989937c19fed6 | Jan Allersma | 2018-10-08 20:36:23 |
Fix bug in Rect from commit 6c91140 in other Shapes as well. | 4165a5da98dd9a548a222c6160390e4e54026d48 | Jan Allersma | 2018-09-28 14:53:40 |
Build interface for ornament creation. | adcf22a4e878edc45ac0775a5e15ebf0bb1a937d | Jan Allersma | 2018-10-08 13:53:52 |
Fully implement File I/O. | 45cbb48489a24857cfc76144b38b12ccebfd9e61 | Jan Allersma | 2018-09-27 16:03:40 |
Fix GroupMenu bug. | be41e51819be1a23e7761ea0662eb188ac641aca | Jan Allersma | 2018-09-27 14:55:20 |
Fix TODO's from previous commit. | 89d8172b77336a6c18f30521147eb81287961f11 | Jan Allersma | 2018-09-27 14:06:30 |
Add groups as preparation for step 3. | a91368128e7444f69b3a30ee4d17f9063c8846b8 | Jan Allersma | 2018-09-26 18:31:49 |
File | Lines added | Lines deleted |
---|---|---|
source/canvas.d | 3 | 6 |
source/commands/destruct.d | 1 | 1 |
source/entities/entity.d | 1 | 5 |
source/entities/group.d | 1 | 2 |
source/frontend/menubar.d | 2 | 2 |
source/frontend/resizeDialog.d | 0 | 2 |
source/frontend/shapeOptions.d | 3 | 5 |
source/history.d | 1 | 1 |
File source/canvas.d changed (mode: 100644) (index e73b85a..2ae242c) | |||
... | ... | import dp.strat.circle; | |
11 | 11 | import dp.strat.ellipse; | import dp.strat.ellipse; |
12 | 12 | import dp.command.create, dp.command.move; | import dp.command.create, dp.command.move; |
13 | 13 | ||
14 | import std.stdio; // For debug | ||
15 | |||
16 | 14 | import Global = dp.global; | import Global = dp.global; |
17 | 15 | ||
18 | 16 | public class Canvas : DrawingArea { | public class Canvas : DrawingArea { |
... | ... | public class Canvas : DrawingArea { | |
28 | 26 | c = newContext; | c = newContext; |
29 | 27 | c.setSourceRgba(1,1,1,1); | c.setSourceRgba(1,1,1,1); |
30 | 28 | this.addOnDraw(&drawCallback); | this.addOnDraw(&drawCallback); |
31 | c.paint(); // gewoon 'repaint' gebruiken? | ||
29 | c.paint(); | ||
32 | 30 | } | } |
33 | 31 | ||
34 | 32 | @property | @property |
... | ... | public class Canvas : DrawingArea { | |
37 | 35 | } | } |
38 | 36 | ||
39 | 37 | public void repaint() { | public void repaint() { |
40 | c.paint(); // Begin met een kale, witte, achtergrond. | ||
38 | c.paint(); // Start with a white, blank, background. | ||
41 | 39 | Global.History.render(); | Global.History.render(); |
42 | 40 | ||
43 | // Laat alle wijzigingingen zien door 'drawCallback' indirect aan te roepen. | ||
41 | // Display all drawings from the rendered contexts. | ||
44 | 42 | queueDraw(); | queueDraw(); |
45 | 43 | } | } |
46 | 44 | ||
... | ... | public class Canvas : DrawingArea { | |
103 | 101 | return true; | return true; |
104 | 102 | } | } |
105 | 103 | ||
106 | // Wat te doen met iedere individuele Context die opnieuw getekend wordt? | ||
107 | 104 | public bool drawCallback(Scoped!Context context, Widget widget) { | public bool drawCallback(Scoped!Context context, Widget widget) { |
108 | 105 | context.setSourceSurface(surface, 0, 0); | context.setSourceSurface(surface, 0, 0); |
109 | 106 | context.paint(); | context.paint(); |
File source/commands/destruct.d changed (mode: 100644) (index 547e012..e754caa) | |||
1 | module dp.command.destruct; // don't use 'dp.command.delete' as module. Causes bug. | ||
1 | module dp.command.destruct; | ||
2 | 2 | ||
3 | 3 | import dp.command.cmd; | import dp.command.cmd; |
4 | 4 | import dp.ent.entity; | import dp.ent.entity; |
File source/entities/entity.d changed (mode: 100644) (index e317789..c3e92a5) | |||
... | ... | module dp.ent.entity; | |
3 | 3 | public import dp.visitor.visitor; | public import dp.visitor.visitor; |
4 | 4 | public import dp.ent.group; | public import dp.ent.group; |
5 | 5 | ||
6 | // Is not being used in Entity class definition, | ||
7 | // but the modules are required in a lot of use | ||
8 | // cases when importing this module for | ||
9 | // implementation of the 'Entity' class. | ||
10 | public import dp.ent.shape; | ||
6 | import dp.ent.shape; | ||
11 | 7 | ||
12 | 8 | class Entity { | class Entity { |
13 | 9 | public bool active = true; | public bool active = true; |
File source/entities/group.d changed (mode: 100644) (index a7746b7..bae6768) | |||
... | ... | import dp.file; | |
6 | 6 | ||
7 | 7 | import std.conv; | import std.conv; |
8 | 8 | import std.random; | import std.random; |
9 | import std.stdio; // Debug | ||
10 | 9 | ||
11 | 10 | import Global = dp.global; | import Global = dp.global; |
12 | 11 | ||
... | ... | class Group : Entity { | |
123 | 122 | return index; | return index; |
124 | 123 | } | } |
125 | 124 | ||
126 | // Redundant? | ||
125 | // Redundant | ||
127 | 126 | public void remove(size_t index) { | public void remove(size_t index) { |
128 | 127 | entities[index].group = null; | entities[index].group = null; |
129 | 128 |
File source/frontend/menubar.d changed (mode: 100644) (index 73f1333..ce34001) | |||
... | ... | public class EditMenu : MenuItem { // protected | |
109 | 109 | } | } |
110 | 110 | ||
111 | 111 | public class ShapeMenu : MenuItem { // protected | public class ShapeMenu : MenuItem { // protected |
112 | // Hetgeen wat geactiveerd wordt als je op 'New shape' klikt. | ||
112 | // Will be activated when clicking 'New shape'. | ||
113 | 113 | Menu shapeMenu; | Menu shapeMenu; |
114 | 114 | ||
115 | // De items die zich in shapeMenu bevinden. | ||
115 | // Items in shapeMenu. | ||
116 | 116 | MenuItem rectangle; | MenuItem rectangle; |
117 | 117 | MenuItem ellipse; | MenuItem ellipse; |
118 | 118 | MenuItem circle; | MenuItem circle; |
File source/frontend/resizeDialog.d changed (mode: 100644) (index a27d1b4..3553e17) | |||
... | ... | import dp.command.resize; | |
12 | 12 | ||
13 | 13 | import Global = dp.global; | import Global = dp.global; |
14 | 14 | ||
15 | import std.stdio; // Debug | ||
16 | |||
17 | 15 | import std.string, std.conv; | import std.string, std.conv; |
18 | 16 | ||
19 | 17 | class ResizeDialog : Dialog { | class ResizeDialog : Dialog { |
File source/frontend/shapeOptions.d changed (mode: 100644) (index a5b6f35..de616ed) | |||
... | ... | import dp.command.destruct; | |
9 | 9 | import dp.win.resize, dp.win.ornament; | import dp.win.resize, dp.win.ornament; |
10 | 10 | import Global = dp.global; | import Global = dp.global; |
11 | 11 | ||
12 | import std.stdio; // For debugging. | ||
13 | |||
14 | 12 | protected Shape s; | protected Shape s; |
15 | 13 | protected ResizeDialog rd; | protected ResizeDialog rd; |
16 | 14 | protected OrnamentDialog od; | protected OrnamentDialog od; |
... | ... | public class ShapeOptions : Menu { | |
26 | 24 | this.append(new AddOrnament()); | this.append(new AddOrnament()); |
27 | 25 | } | } |
28 | 26 | ||
29 | public void selectShape (Shape shape) { // Shows options of param shape. | ||
27 | public void selectShape (Shape shape) { // Shows options for param shape. | ||
30 | 28 | s = shape; | s = shape; |
31 | 29 | this.showAll(); | this.showAll(); |
32 | 30 | this.popup(0, 0); | this.popup(0, 0); |
... | ... | protected class MoveShape : MenuItem { | |
55 | 53 | private bool relCallback (Event event, Widget widget) { | private bool relCallback (Event event, Widget widget) { |
56 | 54 | Global.Brush.clone = s; | Global.Brush.clone = s; |
57 | 55 | Global.Brush.cloneGroup = false; | Global.Brush.cloneGroup = false; |
58 | s.active = false; // In de tussentijd niet gaan drawen totdat het verplaatsen gelukt is!!! | ||
56 | s.active = false; // Don't draw anything until moving the shape is completed! | ||
59 | 57 | // Create ghost shape. | // Create ghost shape. |
60 | 58 | return false; // Hide ShapeOptions when button is released. | return false; // Hide ShapeOptions when button is released. |
61 | 59 | } | } |
... | ... | protected class MoveGroup : MenuItem { | |
94 | 92 | if(s.group !is null) { | if(s.group !is null) { |
95 | 93 | Global.Brush.clone = s; | Global.Brush.clone = s; |
96 | 94 | Global.Brush.cloneGroup = true; | Global.Brush.cloneGroup = true; |
97 | s.group.active = false; // In de tussentijd niet gaan drawen totdat het verplaatsen gelukt is!!! | ||
95 | s.group.active = false; // Don't draw anything until moving the shape is completed! | ||
98 | 96 | // Create ghost group. | // Create ghost group. |
99 | 97 | } | } |
100 | 98 | return false; // Hide ShapeOptions when button is released. | return false; // Hide ShapeOptions when button is released. |
File source/history.d changed (mode: 100644) (index 394b2ce..e06e183) | |||
... | ... | module dp.history; | |
3 | 3 | import dp.command.cmd; | import dp.command.cmd; |
4 | 4 | import dp.file; | import dp.file; |
5 | 5 | ||
6 | import Global = dp.global; // Geen dependency-cycle? | ||
6 | import Global = dp.global; | ||
7 | 7 | ||
8 | 8 | import std.stdio; // Debug | import std.stdio; // Debug |
9 | 9 |