Jump to content

drawPolygon doesn't close unfilled polygons


wayfinder
 Share

Recommended Posts

In Graphics.prototype.drawShape, there's the following code:

    if (data.type === CONST.SHAPES.POLY)    {        data.shape.closed = this.filling;        this.currentPath = data;    }

As you can see, the original value of polygon.closed is overwritten by this.filling, creating the unwanted side effect of polygons that are closed but not filled being wrongly drawn. Can I safely override the function to ensure these polygons are drawn correctly or will that break stuff in other places? My best guess is that the purpose of the line is to ensure that all filled polygons are closed, so this should keep everyone happy:

data.shape.closed = data.shape.closed || this.filling;
Link to comment
Share on other sites

I seriously tried for like two hours to do this the right way, make a pull request, but github just doesn't want me to contribute. whenever i try to turn my local changes into a pull request, i get this shitty monster with changes from half a year ago that someone else wrote: https://github.com/wayfu/pixi.js/pull/1

 

i feel like the stupidest person on this planet

Link to comment
Share on other sites

It doesn't look like you pushed your changes up to github:

 

https://github.com/wayfu/pixi.js/commits/dev-closed-unfilled-polys

 

It also looks like your dev and that branch you are trying to PR are way out of date with the upstream (main pixi.js repo).

 

You can see how to setup a fork and update it here: https://help.github.com/articles/fork-a-repo/

You can see instructions on making a PR here: https://help.github.com/articles/using-pull-requests/

 

You can review the PR before you make it, and your remote is definitely way out of date. Remember that git is not like SVN, a commit does not push out to the remote. You need to commit (which updates your local repo), then push (which syncs your changes to the remote), and sometimes pull (which syncs the remote into your local repo). Git is decentralized, each repo is standalone and there are commands to hlep keep them in sync.

Link to comment
Share on other sites

i already dread the day i want to contribute again and this hasn't been merged. i am 100% sure that it will take me four hours, a broken rib and irreversible nerve damage and i will be unable to keep this change from leaking into the new PR, thereby ensuring THAT won't ever be merged either

Link to comment
Share on other sites

Git and GitHUb are some of the easiest pieces of software to use, I honestly don't understand where your issues are coming from. It sounds like you made a mistake, so it didn't work, then you got too frustrated to think clearly about how to solve the problem. After following my post it works fine, you have to push your code, and it has to be up to date. Git does a lot of things for you, but it isn't magic :)

Link to comment
Share on other sites

oh yeah i was cranky as all get out last night, frustration from git + some severe pain and no medication. i'm a little better now, and glad the pr was merged.

 

but seriously, "some of the easiest pieces of software to use" seems wildly inaccurate ;) the guides you linked alone (thanks again btw) are 5 or 6 six long pages of cryptic and frequently unintuitively named stuff, spread out over three interfaces (client, website, cli), explaining hardly any of the underlying principles or rationales and involving more than a little guess work along the way. i have performed the tasks as described, but i don't feel like it has taught me anything. i suppose with further experience things will get easier, but easy is not currently a label i'd apply

Link to comment
Share on other sites

From the responses I got on twitter when I was complaining, it seemed like a bunch of people shared my frustration ("actively hostile" was one of the phrases that stuck with me :)). some recommended sourcetree as an alternative client. perhaps i'll try that out for the next PR i want to create... 

Link to comment
Share on other sites

On the other hand, every Git GUI client I've tried to use has been a nightmarish mess.

 

Fact. I stopped having problems with git the second I dropped gui and just used the cli, and I've never looked back.

 

Got some nice aliases I always setup as well that keeps things short:

 

https://github.com/englercj/dotfiles/blob/master/.gitconfig#L10-L23

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...