You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a different problem than the other "glitchy metal" report. Here a temporary bitmap is being
created and drawn to create an animated rotation. On non-metal platforms this works very smoothly.
Untitled.design.mp4
the top level of the animation does this
Image r2 = rotationImage.rotate(rotateDirectionMath.PI/2animAmount,0x0);
int xp = rotation_center_x-rwidth/2;
int yp = rotation_center_y-rwidth/2;
r2.makeTransparent(0.25).drawImage(gc,xp,yp);
Basically the image is constructed from raw integers and then immediately drawn.
This occurs in the EDT process.
public Image rotate( double angle, int fillColor)
{
int w = getWidth();
int h = getHeight();
int opix[] = new int[wh];
int ipix[] = new int[wh];
getRGB(0,0,w,h,ipix,0,w);
G.Rotate(ipix,opix,w,h,angle,fillColor);
SystemImage.pixelCount += w*h;
Image fin = new Image("temp for rotate");
fin.createImageFromInts(opix,w,h,0,w);
return(fin);
}
public Image makeTransparent(double percent)
{
int w = getWidth();
int h = getHeight();
int ipix[] = new int[w*h];
getRGB(0,0,w,h,ipix,0,w);
for(int lim = ipix.length-1; lim>=0; lim--)
{
int pix = ipix[lim];
int trans = 0xff&(pix>>24);
trans = (int)(trans*percent);
ipix[lim]=(trans<<24)|(0xffffff&pix);
}
Image fin = new Image("temp for transparent image");
fin.createImageFromInts(ipix,w,h, 0, w);
return(fin);
This is a different problem than the other "glitchy metal" report. Here a temporary bitmap is being
created and drawn to create an animated rotation. On non-metal platforms this works very smoothly.
Untitled.design.mp4
the top level of the animation does this
Image r2 = rotationImage.rotate(rotateDirectionMath.PI/2animAmount,0x0);
int xp = rotation_center_x-rwidth/2;
int yp = rotation_center_y-rwidth/2;
r2.makeTransparent(0.25).drawImage(gc,xp,yp);
Basically the image is constructed from raw integers and then immediately drawn.
This occurs in the EDT process.
public Image rotate( double angle, int fillColor)
{
int w = getWidth();
int h = getHeight();
int opix[] = new int[wh];
int ipix[] = new int[wh];
getRGB(0,0,w,h,ipix,0,w);
G.Rotate(ipix,opix,w,h,angle,fillColor);
SystemImage.pixelCount += w*h;
Image fin = new Image("temp for rotate");
fin.createImageFromInts(opix,w,h,0,w);
}
public Image makeTransparent(double percent)
{
int w = getWidth();
int h = getHeight();
int ipix[] = new int[w*h];
getRGB(0,0,w,h,ipix,0,w);
}