Skip to content

Commit 8e2978b

Browse files
committed
Merge pull request #777 from arusakov/CanvasRenderingContext2D
CanvasRenderingContext2D class name
2 parents d41d6c7 + 2a16ee8 commit 8e2978b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ canvas.toDataURL('image/jpeg', {opts...}, function(err, jpeg){ }); // see Canvas
170170
canvas.toDataURL('image/jpeg', quality, function(err, jpeg){ }); // spec-following; quality from 0 to 1
171171
```
172172

173-
### CanvasRenderingContext2d#patternQuality
173+
### CanvasRenderingContext2D#patternQuality
174174

175175
Given one of the values below will alter pattern (gradients, images, etc) render quality, defaults to _good_.
176176

@@ -180,15 +180,15 @@ Given one of the values below will alter pattern (gradients, images, etc) render
180180
- nearest
181181
- bilinear
182182

183-
### CanvasRenderingContext2d#textDrawingMode
183+
### CanvasRenderingContext2D#textDrawingMode
184184

185185
Can be either `path` or `glyph`. Using `glyph` is much faster than `path` for drawing, and when using a PDF context will embed the text natively, so will be selectable and lower filesize. The downside is that cairo does not have any subpixel precision for `glyph`, so this will be noticeably lower quality for text positioning in cases such as rotated text. Also, strokeText in `glyph` will act the same as fillText, except using the stroke style for the fill.
186186

187187
Defaults to _path_.
188188

189189
This property is tracked as part of the canvas state in save/restore.
190190

191-
### CanvasRenderingContext2d#filter
191+
### CanvasRenderingContext2D#filter
192192

193193
Like `patternQuality`, but applies to transformations effecting more than just patterns. Defaults to _good_.
194194

src/CanvasRenderingContext2d.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Context2d::Initialize(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target) {
9898
Local<FunctionTemplate> ctor = Nan::New<FunctionTemplate>(Context2d::New);
9999
constructor.Reset(ctor);
100100
ctor->InstanceTemplate()->SetInternalFieldCount(1);
101-
ctor->SetClassName(Nan::New("CanvasRenderingContext2d").ToLocalChecked());
101+
ctor->SetClassName(Nan::New("CanvasRenderingContext2D").ToLocalChecked());
102102

103103
// Prototype
104104
Local<ObjectTemplate> proto = ctor->PrototypeTemplate();

0 commit comments

Comments
 (0)