Skip to content

Added support for Ellipse, Polygon and SetPixel #5

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

jsbattig
Copy link

This PR is not with the intention of merging as-is (it also has binaries) but in case you are interested to look and take some of the additions.
It adds support for Ellipse, Polygon and SetPixel.
I reviewed also memory management for disposable objects and refactored a code a bit using using() clause.
You will notice also semantics changed for Rectangle. From prior usage of AspImage we noticed that Rectangle will also fill the image using BackgroundColor property.
With Ellipse I did the same. With Polygon forced the concept of EndPath and Fill the background for simplicity. In theory the behavior should not be like that, but could not find good documentation on how it should work.
Also notice that input/output of color was adapted to VBScript which reverses RGB colors and apparently AspImage uses that mode internally? At least that's how it worked for us, so I added a few routines to reverse the R and B parts for all input and output from the component, so internally the backing field is used when dealing with colors.

Sebastian Battig added 10 commits July 22, 2019 13:37
…sposal.

Added Ellipse and Polygon methods.
Changed Rectangle method to also call FillRect
Updated color management to take as input VBScript compatible color (first and third byte flipped when RGB is encoded)
…he component are treated as VBScript compatible RGB colors (first and third bytes are flipped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant