Skip to content

Commit

Permalink
Remove alpha channel from copy-to-clipboard - fix for #182
Browse files Browse the repository at this point in the history
  • Loading branch information
jfree committed Nov 10, 2020
1 parent 2a85da3 commit 6a23157
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,20 @@ History
-------

##### Version 1.6.0 (not yet released)
- update required JDK to version 1.8;
- modify buffer in ChartPanel to handle high DPI displays (bug #170);
- modify buffer in `ChartPanel` to handle high DPI displays (bug #170);
- add options to control pan vs zoom in `ChartPanel` (https://github.com/jfree/jfreechart/pull/172)
- fix for exception on extreme zoom on NumberAxis (bug #64);
- fix for exception on extreme zoom on `NumberAxis` (bug #64);
- remove alpha channel from copy-to-clipboard (fixes bug #182);
- apply rendering hints to overlays - fixes bug #187;
- added generics
- DefaultIntervalCategoryDataset no longer allows null keys in constructor (this
is a consequence of introducing generics)
- removed ObjectUtils class (https://github.com/jfree/jfreechart/pull/163)
- removed unused URLUtilities class (https://github.com/jfree/jfreechart/pull/162)
- fixed LayeredBarRenderer bugs #169 and #175
- update French translations (https://github.com/jfree/jfreechart/pull/186)
- fix "Save_as" entries in localisation files (https://github.com/jfree/jfreechart/pull/184).
- removed unused `URLUtilities` class (PR #162)
- fixed `LayeredBarRenderer` (bugs #169 and #175);
- update French translations (bug #186);
- fix "Save_as" entries in localisation files (bug #184);
- added generics;
- `DefaultIntervalCategoryDataset` no longer allows null keys in constructor (this
is a consequence of introducing generics);
- update required JDK to version 1.8.

##### Version 1.5.0 (5 November 2017)
- all JavaFX classes moved to a separate project;
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/org/jfree/chart/ChartTransferable.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ private BufferedImage createBufferedImage(JFreeChart chart, int w, int h,
int minDrawW, int minDrawH, int maxDrawW, int maxDrawH) {

BufferedImage image = new BufferedImage(w, h,
BufferedImage.TYPE_INT_ARGB);
BufferedImage.TYPE_INT_RGB); // bug #182
Graphics2D g2 = image.createGraphics();

// work out if scaling is required...
Expand All @@ -238,8 +238,7 @@ private BufferedImage createBufferedImage(JFreeChart chart, int w, int h,
scaleX = drawWidth / minDrawW;
drawWidth = minDrawW;
scale = true;
}
else if (drawWidth > maxDrawW) {
} else if (drawWidth > maxDrawW) {
scaleX = drawWidth / maxDrawW;
drawWidth = maxDrawW;
scale = true;
Expand All @@ -248,8 +247,7 @@ else if (drawWidth > maxDrawW) {
scaleY = drawHeight / minDrawH;
drawHeight = minDrawH;
scale = true;
}
else if (drawHeight > maxDrawH) {
} else if (drawHeight > maxDrawH) {
scaleY = drawHeight / maxDrawH;
drawHeight = maxDrawH;
scale = true;
Expand Down

0 comments on commit 6a23157

Please sign in to comment.