Git Product home page Git Product logo

Comments (10)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 17, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 17, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 17, 2024
- 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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 17, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 17, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 17, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 17, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 17, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 17, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 17, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.