Skip to content

Commit b2506a9

Browse files
committed
Updated the documentation and CHANGELOG
Signed-off-by: Aravinda VK <vkaravinda7@gmail.com>
1 parent 96285d6 commit b2506a9

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
9+
## [v0.2.0] - 2024-12-27
10+
- Add support to draw border.
11+
- Remove stroke from `point` and `pixel` drawing APIs.
12+
- Allow override one corner radius while drawing a rectangle.
13+
- Disallow setting `width` and `height` after initialization.
14+
- Added FormattedString and text API
815
- Moved resolution settings to `saveAs` function.
916
- Change default measurements to `point(pt)`.
1017
- Added support for `100.px`, `10.pt` while specifying the co-ordinates, size etc.
@@ -36,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3643
- Support added tp export to `pdf`, `svg` and `png` formats.
3744
- Published the project to https://code.dlang.org/packages/chitra
3845

39-
[Unreleased]: https://github.com/aravindavk/chitra-d/compare/v0.1.1...HEAD
46+
[Unreleased]: https://github.com/aravindavk/chitra-d/compare/v0.2.0...HEAD
4047
[v0.1.0]: https://github.com/aravindavk/chitra-d/compare/17ba479...v0.1.0
4148
[v0.1.1]: https://github.com/aravindavk/chitra-d/compare/v0.1.0...v0.1.1
49+
[v0.1.1]: https://github.com/aravindavk/chitra-d/compare/v0.1.1...v0.2.0

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Access the width and height of the canvas.
102102
rect(100, 100, width - 200, height - 200);
103103
```
104104

105-
#### Background
105+
#### Background and Border
106106

107107
Fill the background with given color. Color can be provided in `RGB`, or Gray scale or hex strings. Background will draw a rectangle with canvas width and height.
108108

@@ -125,6 +125,23 @@ background("#9694FF");
125125
background("blue");
126126
```
127127

128+
Add border to canvas using,
129+
130+
```d
131+
// Black border of thickness 2
132+
border;
133+
134+
// Border with margin
135+
border(m: 10);
136+
border(m: 10, mt: 0);
137+
138+
// Border with different color
139+
border(m: 10, color: color("blue"));
140+
141+
// Border with radius
142+
border(m: 10, color: color("blue"), r: 7);
143+
```
144+
128145
#### Fill
129146
Similar to background, specify the color before drawing a shape or the text. For example,
130147

0 commit comments

Comments
 (0)