nativescript-community / nativescript-community/ui-canvas
Missing Matrix.mapPoints one parameter version iOS
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 38
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
@farfromrefug Can you please modify the function this way in canvas.ios.ts?
public mapPoints(...args) {
let src: number[];
let dstIndex: number = 0,
srcIndex: number = 0,
pointCount: number;
const pts: number[] = args[0];
if (args.length <= 2) {
src = args[args.length-1];
} else {
dstIndex = args[1] || 0;
srcIndex = args[3] || 0;
pointCount = args[4];
src = args[2];
}
src = src || pts;
pointCount = Math.floor(pointCount || src.length);
for (let index = 0; index < pointCount; index += 2) {
const cgPoint = CGPointApplyAffineTransform(CGPointMake(src[index + srcIndex], src[index + srcIndex + 1]), this._transform);
pts[index + dstIndex] = cgPoint.x;
pts[index + dstIndex + 1] = cgPoint.y;
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in canvas.ios.ts at Matrix.mapPoints and compare its current argument handling with the one-parameter behavior requested in the issue. Verify that the iOS implementation accepts the single points-array form and maps the points correctly; done means that form works without breaking the other documented argument forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, typescript
- Domain
- computer-graphics, mobile-dev
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100