Linus Unnebäck
bef29a3271
strict mode
9 years ago
Linus Unnebäck
858d79bb4c
test: fix up some small issues
10 years ago
Zach Bjornson
b4a05d7892
Replace CanvasPixelArray with Uint8ClampedArray to meet spec.
Added some argument testing/manipulation to match WebKit/Moz behaviors.
Additionally benchmarked:
* branching on `if (a == 0 || a == 255)`, as it is
* not branching (always doing the alpha calculation)
* Mozilla's implementation found here: https://dxr.mozilla.org/mozilla-central/source/dom/canvas/CanvasRenderingContext2D.cpp#5083
Mozilla's is insignificantly faster (p=0.17) :) so left it as-is.
10 years ago
Moritz Peters
3cc99d5f98
Fix typo in context2d for imageSmoothingEnabled
getter instead of setter.
12 years ago
TJ Holowaychuk
d7d4abe2ad
add Context2d#imageSmoothingEnabled=
12 years ago
TJ Holowaychuk
dce07d5023
refactor .useFont()
12 years ago
Julian Viereck
1d3a99d85a
Add support to load fonts from file.
12 years ago
Tj Holowaychuk
f866dd8883
Fixed: Context2d setters with invalid values ignored
13 years ago
Robert Sköld
46bda423f8
Added a test (and fix) for a regression with gradients
13 years ago
Robert Sköld
17080848ba
Check for both CanvasGradient and CanvasPattern in ctx.strokeStyle and ctx.fillStyle.
13 years ago
Robert Sköld
559bd9d572
Started on ctx.createPattern() support.
13 years ago
Tj Holowaychuk
a0e45d449f
Fixed js-land instanceof
causes issues with several Canvas modules
13 years ago
Nathan Rajlich
42fce70a89
Check for the compiled bindings in both places.
When node switched it's build system to GYP then the resulting bin
will be put in "Release" instead of "build". So check for both places with a
little `bindings.js` shim.
13 years ago
Tj Holowaychuk
10da42f2c0
Changed: prefix some private methods with _
14 years ago
Tj Holowaychuk
cdc7aca71a
Fixed font tests
14 years ago
Tj Holowaychuk
24eb4812cd
Fixed; stripping of quotes from font-family before applying
14 years ago
Tj Holowaychuk
cff9649518
Fixed duplicate textAlign getter
14 years ago
Tj Holowaychuk
c10bbcb872
Fixed font size growing issue after successive calls. Closes #70
14 years ago
Tj Holowaychuk
85ae1c931f
Added Context2d::Get{Fill,Stroke}Color()
14 years ago
Tj Holowaychuk
0ff539c691
setting up shadowColor accessors
14 years ago
Tj Holowaychuk
97c7fe6dbd
prep for c color parser
14 years ago
Tj Holowaychuk
1f82f63890
removed old parseColor dependants
14 years ago
Tj Holowaychuk
ddf5c99bbf
removed color parser
14 years ago
Tj Holowaychuk
65b3709a69
Misc cleanup of hsl stuff
14 years ago
Tom Carden
f6dbf624c9
hsl and hsla support plus initial tests
14 years ago
Tj Holowaychuk
09023539c4
Checking instanceof PixelArray
14 years ago
Tj Holowaychuk
2334fc859a
Added createImageData(ImageData) support
14 years ago
Tj Holowaychuk
e9dde1bd31
Added createImageData()
14 years ago
Tj Holowaychuk
8bdac35743
Started getImageData()
14 years ago
Tj Holowaychuk
fdb626da57
Fixed getter bug preventing patterns from being returned via fillStyle etc
14 years ago
Tj Holowaychuk
2c7a7b7057
Misc font parser refactoring
14 years ago
Tj Holowaychuk
4538b9f5ca
Added single quote string support to font parser
14 years ago
Tj Holowaychuk
9ac5934d75
Misc refactoring of font regexp
14 years ago
Tj Holowaychuk
d22afadec8
Cleaning up lib structure
14 years ago
Tj Holowaychuk
1d90aa950a
Stubbed FillText() and StrokeText()
14 years ago
Tj Holowaychuk
66bea777a0
Todos
14 years ago
Tj Holowaychuk
d5f8b08c6d
text example using streaming api
14 years ago
Tj Holowaychuk
857d44bc97
todo
14 years ago
Tj Holowaychuk
9ee167eb01
Defer font caching to font=
allowing us to cache the entire object
14 years ago
Tj Holowaychuk
fac90304e6
Misc refactoring of parseFont()
14 years ago
Tj Holowaychuk
0a4cba8d4e
renamed font to fontre
14 years ago
Tj Holowaychuk
3e332c990a
Added mm / cm
14 years ago
Tj Holowaychuk
253e200957
Added textBaseline=
14 years ago
Tj Holowaychuk
888cb0198d
Added textAlign=
14 years ago
Tj Holowaychuk
51eee1446d
Supporting pt/in font size units
14 years ago
Tj Holowaychuk
b93c406b96
Fixed fillText() fillStroke(), added SetTextPath()
14 years ago
Tj Holowaychuk
51e013abc0
Added Context2d#strokeText()
14 years ago
Tj Holowaychuk
f3bc337a3f
Docs for font=
14 years ago
Tj Holowaychuk
1c4d6d44a7
font size
14 years ago
Tj Holowaychuk
e0aca54c57
Started SetFont()
14 years ago