[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Mystiske farver i java applet



Hej
jeg har lavet en java applet hvor bagrunden er et image som i nogle tilfælde bliver spejlet omkring X- og Y-aksen.
Det virker fint - forudsat at klienten kører 24 eller 32 bits farver.
Men, hvis klienten kører 16 bits farver og der spejles om både X- og Y-akse samtidigt, så gør det galt. Spejling om hhv X eller Y akse virker fint.


Når fejlen optræder så bliver farverne mildest talt mærkelige, tegningen er sådan set intakt.
Her <http://www.rosetechnology.dk/tmp/grafik_ok.png> er et screenshot fra en der kører 32 bits farver (uden fejl)
og her <http://www.rosetechnology.dk/tmp/grafik_fejl.png> er et screen shot hvor fejlen tydeligt ses.


Jeg har spekuleret lidt på om det kunne være pga de indexerede farver, men hvorfor skulle det kun ske når man spejlvender om begge akser på en gang? Det samme gør sig gældene for mange andre mulige fejlkilder - altså den manglende sammenhæng med spejlingen.

her er koden som jeg bruger til at spejle med:
switch (ParamXXXX.valueAsInt()&0x03) {
default:
case 0:
// Ingen spejling:
gBuffer.drawImage(bkGndBuffer,0,0,flowImageSizeX,flowImageSizeY,0,0,flowImageSizeX,flowImageSizeY,this);
break;
case 1:
// Spejling om X og Y-akse:
// Fejler i 16 bits farver:
gBuffer.drawImage(bkGndBuffer,0,0,flowImageSizeX,flowImageSizeY,flowImageSizeX,flowImageSizeY,0,0,this);
break;
case 2:
// Spejling om Y-akse:
gBuffer.drawImage(bkGndBuffer,0,0,flowImageSizeX,flowImageSizeY,0,flowImageSizeY,flowImageSizeX,0,this);
break;
case 3:
// Spejling om X-akse:
gBuffer.drawImage(bkGndBuffer,0,0,flowImageSizeX,flowImageSizeY,flowImageSizeX,0,0,flowImageSizeY,this);
break;
}


Jeg har prøvet at bruge rotate istedet for den doppelte spejling, men det gav samme resultat.
Jeg har ikke gjort noget for at kunne klare indexerede farver, burde jeg have gjordt det?


Ideer søges....!


-- med venlig hilsen / best regards / Mit freundlichen Grüßen

Henrik Bork Steffensen

RoseTechnology A/S
http://www.rosetechnology.dk



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *