Opened 11 years ago

Closed 3 years ago

#7902 closed task (fixed)

Document changes in dojox.gfx

Reported by: Eugene Lazutkin Owned by: Eugene Lazutkin
Priority: blocker Milestone: 1.11
Component: DojoX GFX Version: 1.2.0
Keywords: Cc:
Blocked By: Blocking:

Description

Task to keep track of the documentation updates.

Change History (8)

comment:1 Changed 11 years ago by Eugene Lazutkin

Status: newassigned

comment:2 Changed 10 years ago by Eugene Lazutkin

New home: http://docs.dojocampus.org/dojox/gfx

The work is mostly done, but the documentation should be split by topics.

comment:3 Changed 10 years ago by Eugene Lazutkin

Related ticket: #9277.

comment:4 Changed 10 years ago by Eugene Lazutkin

Laundry list from Mike Wilcox:

Here are the errors/missing info that you requested for Campus GFX:

Groups
You say: "The following conventions are used:" Then you start talking about Paths.
Color
I think this is also supported (which you don't say):
color: {r: 255, g: 255, b: 255, a: 1}
Gradient
Missing examples
Font Property
Confusing - is this SVG Text? No examples, and they are badly needed. The gfx tests are to complicated to copy. I couldn't figure out how to do text (I was in a hurry though)
Matrix
No qualms with matrix docs, but you are missing setTranform, and more importantly it's distinction with applyTransform - I only knew of apply because Tom tipped me off to it.

...oh I see it's mentioned in Shape methods. Maybe just add a little clarity.

Helper Methods
_getRealMatrix() - odd place for this. Why not up in Matrix? And... Matrix should be Transform.
Rectangle
I didn't notice it could do rounded corners. Can it do the corners differently? Like only on the top left and right?
Path
In general, we need more examples.
curves
I couldn't figure out how to curve the beginning point smooth with the end point. I ran a curve to the end point and then closed the path.
curveTo
Two control points, but to what do they belong? It may have just been me, but I ran into a problem when I expected the two c-points to belong to the point, but they belong to the line - meaning the first c-point belongs to the previous point.
arcTo
says: (please see the above link for details) but there is only one reference of "arcTo" on the page
setAbsoluteMode(mode)
Looks very useful, but an example is needed. What are the argument options?
path.setShape("m 0,0 l 100, 100 e")
This really needs some explainin'. The codes are not too hard, but I had to go to WC3 to learn them. And I didn't know case mattered.

Also, I really wanted to do this programatically, like:

path.setShape(shape:[{x,y},{x,y,cx,cy},{x,y,cx,cy},{x,y,cx,cy},{x,y,cx,cy},{}]);

In my code, I added a "t" for type. so t:M, T:Q, T:Z etc.

Text, setFont(font)
What kind of fonts are supported? Is this like HTML, they need to be system fonts? Do they support font families?

Typo in position:

text
A string of characters you want to show aligned to the anchor position. Default: "".
align
Briefly describe the purpose of an anchor point and why the terms are "start middle end" and not "left center right"

Badly need an example. I think the instructions would otherwise be clear here.

comment:5 Changed 10 years ago by Eugene Lazutkin

Thank you, Mike, for the detailed review of the docs.

Right off the bat: the reason it is "start middle end" and not "left center right" because "left" and "right" are relative terms, which depend on the current text's transform. If it is rotated 180 degrees, they will change their meaning. While "start" and "end" are immutable (start of the text, and end of the text respectively). I didn't invent these terms, but reused most commonly used ones, e.g., http://www.w3.org/TR/SVG/text.html#TextAlignmentProperties.

comment:6 Changed 10 years ago by Eugene Lazutkin

Another doc thing from Mike Wilcox:

Apparently, you need to set the html tag of the file to:

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">

...or VML won't render. Further, I had to remove the Doc Type I was using.

comment:7 in reply to:  6 Changed 10 years ago by Eugene Lazutkin

Replying to elazutkin:

VML predates DOCTYPE. Using DOCTYPE introduces subtle changes in placement of VML elements. For now the standards mode is not recommended to use. The research is under way to find out how to use VML in this mode.

This part:

xmlns:o="urn:schemas-microsoft-com:office:office"

is not used by the VML renderer and I expect it can be omitted. Interestingly enough Dojo has code to add these namespaces automatically but apparently it does not always work.

comment:8 Changed 3 years ago by dylan

Milestone: future1.11
Resolution: fixed
Status: assignedclosed

This meta ticket has outlived its usefulness. dojox/gfx docs are in much better shape than they were 7 years ago.

Note: See TracTickets for help on using tickets.