Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15688 closed defect (fixed)

dojox/gfx API doc

Reported by: bill Owned by: Eugene Lazutkin
Priority: high Milestone: 1.8
Component: DojoX GFX Version: 1.7.3
Keywords: Cc: Patrick Ruzand
Blocked By: Blocking:

Description

dojox/gfx.js needs API documentation, explaining the interface returned from that module. Something like

/*=====
return {
   // summary:
  //       ...

   createSurface: function(...){
       // summary:
       //   ...

etc.

Change History (13)

comment:1 Changed 7 years ago by bill

There are a bunch of methods/properties that I see from firebug, not sure how many are part of the official API:

>>> require(["dojox/gfx"], function(gfx){   for(var key in gfx){      console.log(key);   } });
_base
_hasClass
_addClass
_removeClass
defaultPath
defaultPolyline
defaultRect
defaultEllipse
defaultCircle
defaultLine
defaultImage
defaultText
defaultTextPath
defaultStroke
defaultLinearGradient
defaultRadialGradient
defaultPattern
defaultFont
getDefault
normalizeColor
normalizeParameters
makeParameters
formatNumber
makeFontString
splitFontString
cm_in_pt
mm_in_pt
px_in_pt
pt2px
px2pt
normalizedLength
pathVmlRegExp
pathSvgRegExp
equalSources
switchTo
matrix
Matrix2D
shape
Point
Rectangle
path
svg
renderer
Group
Rect
Ellipse
Circle
Line
Polyline
Image
Text
Path
TextPath
Surface
createSurface
fixTarget

comment:2 Changed 7 years ago by bill

Milestone: tbd1.8
Priority: undecidedblocker

comment:3 Changed 7 years ago by cjolif

Actually if you look in there:

http://bill.dojotoolkit.org/api/1.8/dojox/gfx

The APIs you are mentioning are documented. However it should certainly be cleaned by hiding things that are not really APIs to be used on that module (like sub-modules...). Basically to get back to something like we had previously:

http://dojotoolkit.org/api/1.7/dojox/gfx

That said it does not look like a 1.8 blocker to me.

comment:4 Changed 7 years ago by cjolif

Cc: Patrick Ruzand added

comment:5 Changed 7 years ago by bill

Priority: blockerhigh

Ah sorry, my mistake. I didn't see how it was possible for the parser to get that data from the gfx.js definition:

define(["dojo/_base/lang", "./gfx/_base", "./gfx/renderer!"], 
  function(lang, gfxBase, renderer){
	// module:
	//		dojox/gfx
	// summary:
	//		This the root of the Dojo Graphics package
	gfxBase.switchTo(renderer);
	return gfxBase;
});

Actually, I still don't understand, where is that data coming from?

comment:6 Changed 7 years ago by bill

Oh OK, the data comes from gfx/_base, in particular the doc-comment blocks at http://bugs.dojotoolkit.org/browser/dojox/trunk/gfx/_base.js#L155 and http://bugs.dojotoolkit.org/browser/dojox/trunk/gfx/_base.js#L871.

Was http://dojotoolkit.org/api/1.7/dojox/gfx really correct? For example, it doesn't list createSurface().

comment:7 Changed 7 years ago by Eugene Lazutkin

Resolution: fixed
Status: newclosed

In [29378]:

gfx: cleaning up inline docs, !strict, fixes #15688.

comment:8 Changed 7 years ago by bill

In [29384]:

second try to fix _gfxBidiSupport.js so it doesn't mask definitions in _base.js, refs #13101, #15688 !strict

comment:188 Changed 7 years ago by bill

In [29385]:

Lots of gfx doc updates, refs #15688 !strict.

In particular, using MIDs instead of globals in doc.

TODO: these classes are referenced but not defined anywhere: VirtualGroup?, TextArgs, FontArgs, FillArgs, StrokeArgs

comment:189 Changed 7 years ago by Eugene Lazutkin

In [29402]:

gfx: more work on inline comments, thx Bill!, !strict, refs #15688.

comment:190 Changed 7 years ago by bill

In [29403]:

reference dojox/gfx.Shape rather than dojox/gfx/shape.Shape, etc., refs #15688 !strict

comment:191 Changed 7 years ago by Eugene Lazutkin

In [29404]:

gfx: removed documentation references to the non-existent VirtualGroup?, thx Bill!, !strict, refs #15688.

comment:192 Changed 7 years ago by bill

In [29410]:

Doc for VectorText?.draw() parameters, thanks Tom, refs #15688 !strict.

Also fixing the methods to be output to API viewer, rather than just the module level summary.
This module is weird though, it can't decide between the name VectorText and VectorFont.

Note: See TracTickets for help on using tickets.