-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better Quality Documentation #42
Better Quality Documentation #42
Conversation
Most of these are not part of the HTML Canvas spec and should not be documented or exposed. Is there a way to make the doc generator skip certain methods? getImageData is part of the spec. It is supposed to return a subset of the underlying image, which this code doesn't do yet (obviously). So that's a bug (or technically, an unimplemented api function). |
Sure is - I can add |
All of the ones listed above.
… On Nov 24, 2017, at 9:02 AM, Robert Main ***@***.***> wrote:
Sure is - I can add @ignore before the ones you don't want published if you let me know which ones those are (or did you just means all of the ones I listed above)?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#42 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAQ5ymr8vX2GeF434UNXCLHgAFXW65plks5s5vZmgaJpZM4QpZbL>.
|
OK - I added |
Move class properties out of `Object.defineProperty` calls to class getters and setters. This allows us to target them with esdoc annotations in a way that wasn't possible before with `Object.defineProperty` Ref joshmarinacci#32
- Remove `/** @ignore*/` before each dependency require - unfortunately this will make the documentation coverage score go down, but it seems better to have easier to read code - Assign dependencies with `const` instead of `var` since it prevents accidental re-assignment - Sort dependencies alphabetically
Add `@ignore` to unimplemented methods to hide them from the documentation Ref joshmarinacci#32
- Hide private methods and properties - Add `esdoc-member-plugin` to document ES6 class getters and setters Ref joshmarinacci#32
- Update documentation for line related functions to provide examples on how they can be called - Also remove `makeLine()` function since it is now obsolete Ref joshmarinacci#32
Update `Context` to more closely match the documentation on MDN, since it is intended to match the API available from the HTML5 `<canvas>` API. In each case - a link has been provided to the appropriate MDN page, both for attribution and for further reference. Ref joshmarinacci#32
Provide documentation for additional methods(in particular those not available on MDN for reference) to better explain their purpose and usage. Whilst some of these methods may be private and/or non-exported - this information may still prove useful for library contributors and maintainers(some IDEs can provide this information in a popup dialog box). Also, make more usage of `{@link }` to link to other classes, functions, variables etc. when talking about them in the docblocks Ref joshmarinacci#32
- Align `=` signs to make the assignments easier to read - Replace single-line `if` statements to wrap `return` in braces so it's easier to read at a glance - Remove commented out `console.log` logging/debugging code
Fix small documentation bugs(missing asterisks etc.) causing impoper formatting of documentation Ref joshmarinacci#32
Add missing docblocks for `start` and `end` attribues of `Line` Ref joshmarinacci#32
Provide more detailed documentation on the Bitmap class Ref joshmarinacci#32
Add `@ignore` tag to methods that are not part of the canvas API spec Ref joshmarinacci#32
8f534ca
to
42c9452
Compare
Update function docblocks to correctly reflect the fact that resolved promises resolve to `void` Ref joshmarinacci#32
This PR builds on the original docblock documentation(originally proposed in #32) to provide more helpful information to consumers of the API. In particular, it makes very heavy references to MDN - however in each case, a link has been provided to the relevant MDN page(this will be displayed in the generated documentation). In particular this should be very useful when it's auto-generated (see #39) for each commit to
master
.However - I do have a few questions regarding some of the methods and/or parameters whose purpose I wasn't easily able to determine from reading the code and/or MDN...
If you're able to answer these questions I can update the PR with the relevant docs..
Context.js
fillPixelWithColor
-x
andy
kinda make sense...but what doescol
do? How is it used and how should I go about documenting it's use?https://github.com/robertmain/node-pureimage/blob/master/src/context.js#L322-L328
composite
- What do theoldpixel
andnewpixel
parameters mean? Also - the first two parameters are never actually used... can this be changed?https://github.com/robertmain/node-pureimage/blob/master/src/context.js#L342-L362
calculateRGBA
- It looks like this accepts parameters, but never actually uses them - can we get rid of those?https://github.com/robertmain/node-pureimage/blob/master/src/context.js#L374-L376
calculateRGBA_stroke
- It looks like this accepts parameters, but never actually uses them - can we get rid of those?https://github.com/robertmain/node-pureimage/blob/master/src/context.js#L388-L390
calcQuadraticAtT
https://github.com/robertmain/node-pureimage/blob/master/src/context.js#L1056-L1060
getImageData
- It looks like this accepts parameters, but never actually uses them - can we get rid of those?https://github.com/robertmain/node-pureimage/blob/master/src/context.js#L405-L407
calcMinimumBounds
- Need a better description of thishttps://github.com/robertmain/node-pureimage/blob/master/src/context.js#L1083-L1096
calcSortedIntersections
- What does they
parameter do? Does it represent the actualy
axis, or is it just a letter?https://github.com/robertmain/node-pureimage/blob/master/src/context.js#L1111-L1122
lerp
- What do these params mean?https://github.com/robertmain/node-pureimage/blob/master/src/context.js#L1139
Bitmap.js
constructor
- It's asking for theoptions
parameter, but this seems to never actually be used...https://github.com/robertmain/node-pureimage/blob/master/src/bitmap.js#L20-L44
getPixelRGBA_separate
- Can you help me come up with a description of this method? Maybe an example that I could include in the docs?