Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

反奇偶规则Path.FillType.EVEN_ODD怎么失效了。

Open
#89 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, java

Research direction

Start with the custom View drawing code represented by the snippet, especially the Path.setFillType and canvas.drawPath calls. Reproduce the example with EVEN_ODD and INVERSE_EVEN_ODD, then compare the rendered result against Android's Path.FillType documentation; done means the observed behavior is explained or a confirmed Android issue is documented.

Written by the indexing model from the issue text.

Description

    mPaint.setStyle(Paint.Style.FILL);
    canvas.translate(mWidth / 2, mHeight / 2);
    Path path = new Path();
    path.addRect(-200,-200,200,200, Path.Direction.CW);
    //path.setFillType(Path.FillType.EVEN_ODD);
    path.setFillType(Path.FillType.INVERSE_EVEN_ODD);            // 反奇偶规则
    canvas.drawPath(path, mPaint);

效果跟使用Path.FillType.EVEN_ODD的效果一样,应该相反的。不知道怎么回事。。

Dominant language
Java
Stars
9.3k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GcsSloop/AndroidNote

All issues in GcsSloop/AndroidNote

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.