-
Notifications
You must be signed in to change notification settings - Fork 190
Snippet for demonstrating Cropping and Scaling of GC#drawImage #2912
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
base: master
Are you sure you want to change the base?
Snippet for demonstrating Cropping and Scaling of GC#drawImage #2912
Conversation
| * are made available under the terms of the Eclipse Public License 2.0 | ||
| * which accompanies this distribution, and is available at | ||
| * https://www.eclipse.org/legal/epl-2.0/ | ||
| * Copyright (c) 2000, 2016 IBM Corporation and others. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this was (mostly) copied, but even then the date does not reflect date of current content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, the header was copied from an existing snippet.
I’ve updated the copyright year to reflect the current content.
dacf932 to
5a92e80
Compare
Previously, GC#drawImage was only used in Snippet 10 to demonstrate scaling. Since the method also supports cropping parts of a source image, and scaling itself can be achieved by passing only the destination coordinates/width/height, this commit adds a more expressive snippet (adresses eclipse-platform#565).
5a92e80 to
ebd2b7b
Compare
Test Results 173 files - 3 173 suites - 3 22m 24s ⏱️ - 4m 53s Results for commit ebd2b7b. ± Comparison against base commit 47e2587. This pull request removes 1 test.This pull request skips 1 test. |
akoch-yatta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general it looks good to me.
I need to test a bit more, but the Screenshot of the snippet and the entry in Snippets.md is missing, have a look e.g. in cf6ee39 to see, what is necessary for a new Snippet
Previously, GC#drawImage was only used in Snippet 10 to demonstrate scaling. Since the method also supports cropping parts of a source image, and scaling itself can be achieved by passing only the destination coordinates/width/height, this PR adds a more expressive snippet (adresses #565).