[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] Pixel-perfect drawing on JPanel
From:       Michał_Błaszak <mibl () stibosystems ! com>
Date:       2018-12-20 11:11:53
Message-ID: AM0PR01MB4577AF9AC3F7275958C44243AABF0 () AM0PR01MB4577 ! eurprd01 ! prod ! exchangelabs ! com
[Download RAW message or body]

[Attachment #2 (multipart/related)]

[Attachment #4 (multipart/alternative)]


Hi All,

I hope this is a known problem but just in case it's not.

Trying to make an app drawing something on JPanel I noticed some annoying i=
naccuracies.

The attached piece of code is supposed to draw a series of lines one below =
the other (swapping colors are to demonstrate what's happening).
The result is presented in the following picture:
[cid:image003.jpg@01D4985D.2FD2C670]

That means that some pixels are unreachable.

I tested it on several jdk releases. Results are:
OpenJDK Runtime Environment (build 1.8.0_40-b25): Works correctly
OpenJDK Runtime Environment (build 9+181): Wrong behavior
OpenJDK Runtime Environment 18.3 (build 10.0.2+13): Wrong behavior
OpenJDK Runtime Environment 18.9 (build 11.0.1+13): Wrong behavior

The same inaccuracies are observable when using drawRect() or fillRect().

I wanted to report is a bug but I do not know how to do it.
Thank you for looking at it.

Best regards

Micha=B3 B=B3aszak
Section Manager, Research & Development


[Attachment #7 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="PL">Hi All,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="PL"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal">I hope this is a known problem but just in case it&#8217;s \
not.<o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Trying to make an app drawing something on JPanel I noticed some \
annoying inaccuracies.<o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">The attached piece of code is supposed to draw a series of lines \
one below the other (swapping colors are to demonstrate what's \
happening).<o:p></o:p></p> <p class="MsoNormal">The result is presented in the \
following picture:<o:p></o:p></p> <p class="MsoNormal"><img width="562" height="114" \
style="width:5.85in;height:1.1833in" id="Picture_x0020_1" \
src="cid:image003.jpg@01D4985D.2FD2C670"><o:p></o:p></p> <p \
class="MsoNormal"><o:p>&nbsp;</o:p></p> <p class="MsoNormal">That means that some \
pixels are unreachable.<o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I tested it on several jdk releases. Results are:<o:p></o:p></p>
<p class="MsoNormal">OpenJDK Runtime Environment (build 1.8.0_40-b25): Works \
correctly<o:p></o:p></p> <p class="MsoNormal">OpenJDK Runtime Environment (build \
9&#43;181): Wrong behavior<o:p></o:p></p> <p class="MsoNormal">OpenJDK Runtime \
Environment 18.3 (build 10.0.2&#43;13): Wrong behavior<o:p></o:p></p> <p \
class="MsoNormal">OpenJDK Runtime Environment 18.9 (build 11.0.1&#43;13): Wrong \
behavior<o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">The same inaccuracies are observable when using drawRect() or \
fillRect().<o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I wanted to report is a bug but I do not know how to do \
it.<o:p></o:p></p> <p class="MsoNormal">Thank you for looking at it.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span \
style="font-family:&quot;Arial&quot;,sans-serif;color:#535353;mso-fareast-language:DA">Best \
regards</span><span style="font-family:&quot;Arial&quot;,sans-serif;color:#1F497D;mso-fareast-language:DA"><o:p></o:p></span></p>
 <p class="MsoNormal" style="text-autospace:none"><span \
style="font-family:&quot;Arial&quot;,sans-serif;color:#1F497D;mso-fareast-language:DA"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal" style="text-autospace:none"><b><span \
style="font-family:&quot;Arial&quot;,sans-serif;color:#FF4000;mso-fareast-language:DA">Michał \
Błaszak<o:p></o:p></span></b></p> <p class="MsoNormal"><span \
style="font-family:&quot;Arial&quot;,sans-serif;color:#535353;mso-fareast-language:DA">Section \
Manager, Research &amp; Development</span><span \
style="color:#1F497D"><o:p></o:p></span></p> <p \
class="MsoNormal"><o:p>&nbsp;</o:p></p> </div>
</body>
</html>


["image003.jpg" (image/jpeg)]
["test.java" (application/octet-stream)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic