kapstok / NHL-DePa2 (public) (License: Unspecified) (since 2018-11-09) (hash sha1)
Design Patterns school project; a GUI using multiple Design Patterns.
List of commits:
Subject Hash Author Date (UTC)
Fix undo/redo for 'MoveCmd'. be51bea021bfe5ff79e16a92d350677aed736ddd Jan Allersma 2018-09-19 08:49:55
Implement shapeOptions without undo/redo. bbe699f41e5dacbfdadfaa879452ac2f4501f5a1 Jan Allersma 2018-09-18 19:44:44
WIP: Restore 'shapeOptions.d'. 888b8ea647c0f25cfbeefcd97ee7ebb59e7f0751 Jan Allersma 2018-09-18 15:46:05
Rebuild project from scratch. df0f2f82a86581ba9fa3a169d63a950229341a9f Jan Allersma 2018-09-18 15:04:32
Add resize option. 961e464090918d83690ff66838f2fc96c6ad213a Jan Allersma 2018-09-13 18:29:44
Make `MoveCmd` Command-oriented. 2970a8d862285752551be2464422375ca958357f Jan Allersma 2018-09-12 15:33:17
Change of strategy: Make project command-oriented. ce40dffb1675661922411eeb07f148f61a176c22 Jan Allersma 2018-09-12 11:35:45
Initial commit. 38c8818349679937ae25dde38949202ec45ea7b2 Jan Allersma 2018-09-11 20:21:57
Commit be51bea021bfe5ff79e16a92d350677aed736ddd - Fix undo/redo for 'MoveCmd'.
Author: Jan Allersma
Author date (UTC): 2018-09-19 08:49
Committer name: Jan Allersma
Committer date (UTC): 2018-09-21 13:54
Parent(s): bbe699f41e5dacbfdadfaa879452ac2f4501f5a1
Signing key:
Tree: 09ba89dad6d3eb5c0dc567965c46e395d917f4d1
File Lines added Lines deleted
source/shapes/rect.d 9 0
source/shapes/shape.d 2 3
File source/shapes/rect.d changed (mode: 100644) (index 60b3770..302036d)
... ... module dp.shape.rect;
2 2
3 3 import cairo.Context; import cairo.Context;
4 4 import dp.shape.shape; import dp.shape.shape;
5 import std.conv;
5 6
6 7 import Global = dp.global; import Global = dp.global;
7 8
 
... ... class Rectangle : Shape {
16 17 return "rectangle"; return "rectangle";
17 18 } }
18 19
20 @property
21 public override int[2] position() {
22 return [
23 to!int(bounds[0][0] + size / 2),
24 to!int(bounds[0][1] + size / 2)
25 ];
26 }
27
19 28 protected override void initSize(double size) { protected override void initSize(double size) {
20 29 this.size = size != 0 ? size : 125; this.size = size != 0 ? size : 125;
21 30 } }
File source/shapes/shape.d changed (mode: 100644) (index 4bb4f9a..1a62119)
... ... class Shape {
29 29 @property @property
30 30 public abstract string type(); public abstract string type();
31 31
32 // Returns center of shape.
32 33 @property @property
33 public int[2] position() {
34 return [to!int(bounds[0][0]), to!int(bounds[0][1])];
35 }
34 public abstract int[2] position();
36 35
37 36 /+ /+
38 37 public string toString() { public string toString() {
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/kapstok/NHL-DePa2

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/kapstok/NHL-DePa2

Clone this repository using git:
git clone git://git.rocketgit.com/user/kapstok/NHL-DePa2

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main