Comments (10)
Thank you for your contribution. I'll check your patch later.
Original comment by [email protected]
on 9 Feb 2010 at 9:54
- Changed state: Accepted
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from flashcanvas.
Some comments:
- TextMetrics
Should we implement the attribute "height"? It's not in the specification.
- server side script
It's better to add the following header, isn't it?
header('Content-Disposition: attachment; filename="canvas.png"');
- getScriptUrl()
No need to modify. See http://d.hatena.ne.jp/shogo4405/20070206/1170741017 for
example. The page is written in Japanese, but you'll understand what I want to
say if
you look at the code.
Original comment by [email protected]
on 10 Feb 2010 at 10:06
from flashcanvas.
- TextMetrics
I added this because I never understood why this isn't in the specs, but if it
isn't
in the spec, it isn't in the spec...
- server side script
Yep, it would even be better to add this :
$ext = substr($mime, strrpos($mime, "/")+1);
header('Content-Disposition: attachment; filename="image.'.$ext.'"');
- getScriptUrl()
Very clever ! I didn't know this
I saw that FlashCanvas pro supported text rotation, did you make it work with
rotationZ (but Flash10 only) ? It's really sad the result is so bad compared to
embedded fonts, there must be a way to make it better with another method.
I'll have to add the relative font size with "em" and percents, that's not so
hard.
Multiple font families support too (only the first one will be used here, and
if not
found, it will always fall back to a serif font)
Original comment by fabien.menager
on 10 Feb 2010 at 10:25
from flashcanvas.
Committed some patches. The remaining patches will follow.
> - custom menu with two options : "Save image as" and "Go to project page"
(FxCanvas)
> - added a few data types as they are in the spec for future use
(CanvasPixelArray,
ImageData and TextMetrics)
> - added a server side script taking as POST parameter a data URI scheme for
image
download
> - added support for JPEG for the toDataUrl method
I removed the code for height attribute from TextMetrics.as, because it is not
supported also in other browsers.
As for text rotation, I didn't use rotationZ. If you need more information,
please
E-mail me.
Original comment by [email protected]
on 11 Feb 2010 at 10:13
from flashcanvas.
Fabien, your patch contains the modification:
> // If the browser does not support HTML5 Canvas (the CanvasRenderingContext2D
global object is
> // not defined in Safari 3, whereas is supports Canvas)
> if (!window["CanvasRenderingContext2D"] &&
!document.createElement("canvas").getContext) {
I propose an alternative since I don't want to use createElement("canvas") here.
So what do you think?
// If the browser is IE and does not support HTML5 Canvas
if (window.ActiveXObject && !window["CanvasRenderingContext2D"]) {
Original comment by [email protected]
on 12 Feb 2010 at 3:20
from flashcanvas.
Hello, thank for applying some parts of my match !
I suggest something even better :
if (false /*@cc_on || !window["CanvasRenderingContext2D"]*/) {
The second part won't even be interpreted by non-IE browsers in the case the
script tag
is not between conditionnal comments.
Original comment by fabien.menager
on 12 Feb 2010 at 3:37
from flashcanvas.
Unfortunately, Google Closure Compiler does not (and will not) support
conditional
comments. It's sad...
http://code.google.com/p/closure-compiler/issues/detail?id=47
Original comment by [email protected]
on 12 Feb 2010 at 4:13
from flashcanvas.
Committed the remaining patches with little modification.
If you do not have any objection, I'll close this issue in a few days.
Original comment by [email protected]
on 16 Feb 2010 at 10:33
from flashcanvas.
That's OK for me !
I'll fix the font size ASAP.
Original comment by fabien.menager
on 18 Feb 2010 at 3:58
from flashcanvas.
This issue was closed.
If you make additional patches, please report it as an other issue.
Original comment by [email protected]
on 28 Feb 2010 at 9:51
- Changed state: Fixed
from flashcanvas.
Related Issues (20)
- No support for fonts embedded with @font-face css declarations HOT 22
- Fix for isPointInPath HOT 2
- fillText does not render if it is the last canvas command HOT 2
- FlashCanvas doesn't recognise a same-origin image load when a full path is used HOT 1
- Multi-point paths drawn incorrectly HOT 4
- Can't get base64 of image from canvas HOT 3
- FlashCanvas does not lead base64 encoded images HOT 7
- restore not correctly restoring clipping area HOT 3
- Extrem slowdown after 117 drawImage HOT 4
- ArgumentError: Error #2082: Connect failed because the object is already connected. HOT 1
- IE8 local issues HOT 1
- measureText() throws an Exception when argument is not a string (integer or float) HOT 2
- measureText
- IE8 error "Unknown name" HOT 4
- Does not support onMouseMove event - which makes drag and dropping impossible HOT 1
- error in flashcanvas getting image from div HOT 1
- StrokeStyle randomy fails to apply using save()/restore()
- Patch for /trunk/src/flashcanvas.js HOT 2
- toDataUrl() - IE8 Support
- Tracking down a license HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flashcanvas.