Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1f2922e

Browse files
hansonrhansonr
hansonr
authored and
hansonr
committed
GraphicsConfiguration fix for STABLE BufferedImage;Character.toString(c)
1 parent3d19260 commit1f2922e

File tree

9 files changed

+19
-7
lines changed

9 files changed

+19
-7
lines changed
217 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20200715193703
1+
20200718212919
217 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20200715193703
1+
20200718212919
217 Bytes
Binary file not shown.

‎sources/net.sf.j2s.java.core/src/java/awt/GraphicsConfiguration.java‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,11 @@ public BufferedImage createCompatibleImage(int width, int height,
186186
}
187187

188188

189-
protectedBufferedImagenewBufferedImage(ColorModelcm,WritableRasterwr,
190-
booleanalphaPremultiplied,Hashtable<?, ?>properties) {
191-
returnnewBufferedImage(cm,wr,alphaPremultiplied,properties);
189+
protectedBufferedImagenewBufferedImage(ColorModelcm,WritableRasterwr,booleanalphaPremultiplied,
190+
Hashtable<?, ?>properties) {
191+
BufferedImagebi =newBufferedImage(cm,wr,alphaPremultiplied,properties);
192+
bi.getRaster().秘setStable(true);
193+
returnbi;
192194
}
193195

194196
/**

‎sources/net.sf.j2s.java.core/src/java/awt/image/BufferedImage.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ public Graphics2D createGraphics() {
13311331
秘g =newJSGraphics2D(秘canvas);
13321332
}
13331333

1334-
if (秘haveRaster()) {
1334+
if (秘haveRaster() &&秘isDataStolen()) {
13351335
// we need to draw the image now, because it might
13361336
// have pixels. Note that Java actually does not
13371337
// allow creating a Graphics from MemoryImageSource
@@ -1341,7 +1341,7 @@ public Graphics2D createGraphics() {
13411341
}
13421342
Objectpix =秘pix;
13431343
/**
1344-
* @j2sNativeif(pix) pix.img = this;
1344+
* @j2sNativepix &&(pix.img = this);
13451345
*
13461346
*/
13471347

‎sources/net.sf.j2s.java.core/srcjs/js/j2sClazz.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5365,6 +5365,11 @@ if(radix >= 2 && radix <= 36){
53655365
}
53665366
return-1;
53675367
},1);
5368+
5369+
m$(C$,"toString$C",function(c){
5370+
returnc;
5371+
},1);
5372+
53685373
m$(C$,"toString",
53695374
function(c){
53705375
if(arguments.length==0){

‎sources/net.sf.j2s.java.core/srcjs/swingjs2.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19366,6 +19366,11 @@ if(radix >= 2 && radix <= 36){
1936619366
}
1936719367
return -1;
1936819368
}, 1);
19369+
19370+
m$(C$,"toString$C", function(c) {
19371+
return c;
19372+
}, 1);
19373+
1936919374
m$(C$,"toString",
1937019375
function(c){
1937119376
if (arguments.length == 0) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp