<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Except with something like canvas, people are going to care about the precise pixel-level details of the rendering.  We can't handwave these details away using vague terminology like low-quality or high-quality, where the user agent is free to decide what those terms mean.  If we do that, then we risk not having interoperability between browsers.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>dave</DIV><DIV><BR class="khtml-block-placeholder"><DIV><DIV><DIV>On Oct 20, 2006, at 10:44 PM, Andrew Fedoniouk wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">Dave, v</SPAN></FONT><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">arious implementations use different libraries/approaches for the Graphics.</SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">Way of tuning parameters and their set can be different. I think that it is simply not possible</SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">to generalize them all. </SPAN></FONT><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">At least something generic like preference=quality/speed switch makes real sense.</SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"></FONT> </DIV><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">Technically it is better to allow to get two Graphics instances for the same canvas and use</SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">them at the same time if really needed. In any case 2D and 3D graphics shall coexist on the same surface. </SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">So why not 2D and 2D-fast ?</SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"></FONT> </DIV><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">In any case it is up to UA to provide multiple implementation for different values of contextID.</SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">contextID as a string is there in purpose I belive. That is the one.</SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"></FONT> </DIV><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">Andrew Fedoniouk.</SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"><A href="http://terrainformatica.com"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: Arial; font-size: 10px; -khtml-text-decorations-in-effect: underline; ">http://terrainformatica.com</SPAN></A></FONT></DIV><DIV><FONT face="Arial" size="2"></FONT> </DIV><DIV><FONT face="Arial" size="2"></FONT> </DIV><DIV><FONT face="Arial" size="2"></FONT> </DIV><DIV><FONT face="Arial" size="2"></FONT> </DIV><DIV><FONT face="Arial" size="2"></FONT> </DIV><BLOCKQUOTE dir="ltr" style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"><DIV style="FONT: 10pt arial; font-family: arial; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; ">----- Original Message -----</SPAN></DIV><DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black; font-family: arial; font-size: 13.3333px; "><B style="font-family: arial; font-size: 13.3333px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; font-weight: bold; ">From:</SPAN></B><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "> </SPAN><A title="hyatt@apple.com" href="mailto:hyatt@apple.com"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: arial; font-size: 13.3333px; -khtml-text-decorations-in-effect: underline; ">David Hyatt</SPAN></A><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "></SPAN></DIV><DIV style="FONT: 10pt arial; font-family: arial; font-size: 13.3333px; "><B style="font-family: arial; font-size: 13.3333px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; font-weight: bold; ">To:</SPAN></B><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "> </SPAN><A title="news@terrainformatica.com" href="mailto:news@terrainformatica.com"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: arial; font-size: 13.3333px; -khtml-text-decorations-in-effect: underline; ">Andrew Fedoniouk</SPAN></A><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "></SPAN></DIV><DIV style="FONT: 10pt arial; font-family: arial; font-size: 13.3333px; "><B style="font-family: arial; font-size: 13.3333px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; font-weight: bold; ">Cc:</SPAN></B><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "> </SPAN><A title="canvasgame@gmail.com" href="mailto:canvasgame@gmail.com"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: arial; font-size: 13.3333px; -khtml-text-decorations-in-effect: underline; ">Benjamin Joffe</SPAN></A><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "> ; </SPAN><A title="whatwg@whatwg.org" href="mailto:whatwg@whatwg.org"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: arial; font-size: 13.3333px; -khtml-text-decorations-in-effect: underline; ">whatwg@whatwg.org</SPAN></A><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "></SPAN></DIV><DIV style="FONT: 10pt arial; font-family: arial; font-size: 13.3333px; "><B style="font-family: arial; font-size: 13.3333px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; font-weight: bold; ">Sent:</SPAN></B><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "> Friday, October 20, 2006 10:12 PM</SPAN></DIV><DIV style="FONT: 10pt arial; font-family: arial; font-size: 13.3333px; "><B style="font-family: arial; font-size: 13.3333px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; font-weight: bold; ">Subject:</SPAN></B><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13.3333px; "> Re: [whatwg] Canvas draw quality</SPAN></DIV><DIV><FONT face="Arial" size="2"></FONT><FONT face="Arial" size="2"></FONT><BR></DIV>I don't think a totally different context is a good idea.  Sometimes you want to mix antialiased and non-antialiased modes.<DIV><FONT face="Arial" size="2"></FONT><FONT face="Arial" size="2"></FONT><BR class="khtml-block-placeholder"></DIV><DIV>The API in CG is part of the graphics state...</DIV><DIV><FONT face="Arial" size="2"></FONT><FONT face="Arial" size="2"></FONT><FONT face="Arial" size="2"></FONT><BR class="khtml-block-placeholder"></DIV><DIV>CGContextSetShouldAntialias</DIV><DIV><FONT face="Arial" size="2"></FONT><FONT face="Arial" size="2"></FONT><BR class="khtml-block-placeholder"></DIV><DIV>I don't think an API like this should be vague about what it's doing... e.g., just using vague terms like "quality."  We should say what we mean... antialiasing for example.</DIV><DIV>dave</DIV><DIV><FONT face="Arial" size="2"></FONT><FONT face="Arial" size="2"></FONT><FONT face="Arial" size="2"></FONT><BR><DIV><DIV>On Oct 20, 2006, at 10:01 PM, Andrew Fedoniouk wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><SPAN class="Apple-style-span" style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; border-spacing: 0px 0px; khtml-text-decorations-in-effect: none; apple-text-size-adjust: auto; orphans: 2; widows: 2"><DIV><FONT face="Arial" size="2"></FONT> </DIV><BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"><DIV style="FONT: 13px arial; font-family: arial; font-size: 13px; "><SPAN class="Apple-style-span" style="FONT-SIZE: 13px; FONT-FAMILY: arial"><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13px; ">----- Original Message -----</SPAN></SPAN></DIV><DIV style="BACKGROUND: #e4e4e4; FONT: 13px arial; font-color: black; font-family: arial; font-size: 13px; "><B style="FONT-WEIGHT: bold; FONT-SIZE: 13px; FONT-FAMILY: arial"><SPAN class="Apple-style-span" style="FONT-WEIGHT: bold; FONT-SIZE: 13px; FONT-FAMILY: arial"><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13px; font-weight: bold; ">From:</SPAN></SPAN></B><SPAN class="Apple-style-span" style="FONT-SIZE: 13px; FONT-FAMILY: arial"><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13px; "> </SPAN></SPAN><A title="canvasgame@gmail.com" href="mailto:canvasgame@gmail.com"><SPAN class="Apple-style-span" style="FONT-SIZE: 13px; COLOR: rgb(0,0,238); FONT-FAMILY: arial; khtml-text-decorations-in-effect: underline; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: arial; font-size: 13px; -khtml-text-decorations-in-effect: underline; ">Benjamin Joffe</SPAN></SPAN></A><SPAN class="Apple-style-span" style="FONT-SIZE: 13px; FONT-FAMILY: arial"></SPAN></DIV><DIV style="FONT: 13px arial; font-family: arial; font-size: 13px; "><B style="FONT-WEIGHT: bold; FONT-SIZE: 13px; FONT-FAMILY: arial"><SPAN class="Apple-style-span" style="FONT-WEIGHT: bold; FONT-SIZE: 13px; FONT-FAMILY: arial"><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13px; font-weight: bold; ">To:</SPAN></SPAN></B><SPAN class="Apple-style-span" style="FONT-SIZE: 13px; FONT-FAMILY: arial"><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13px; "> </SPAN></SPAN><A title="whatwg@whatwg.org" href="mailto:whatwg@whatwg.org"><SPAN class="Apple-style-span" style="FONT-SIZE: 13px; COLOR: rgb(0,0,238); FONT-FAMILY: arial; khtml-text-decorations-in-effect: underline; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: arial; font-size: 13px; -khtml-text-decorations-in-effect: underline; ">whatwg@whatwg.org</SPAN></SPAN></A><SPAN class="Apple-style-span" style="FONT-SIZE: 13px; FONT-FAMILY: arial"></SPAN></DIV><DIV style="FONT: 13px arial; font-family: arial; font-size: 13px; "><B style="FONT-WEIGHT: bold; FONT-SIZE: 13px; FONT-FAMILY: arial"><SPAN class="Apple-style-span" style="FONT-WEIGHT: bold; FONT-SIZE: 13px; FONT-FAMILY: arial"><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13px; font-weight: bold; ">Sent:</SPAN></SPAN></B><SPAN class="Apple-style-span" style="FONT-SIZE: 13px; FONT-FAMILY: arial"><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13px; "> Friday, October 20, 2006 9:09 PM</SPAN></SPAN></DIV><DIV style="FONT: 13px arial; font-family: arial; font-size: 13px; "><B style="FONT-WEIGHT: bold; FONT-SIZE: 13px; FONT-FAMILY: arial"><SPAN class="Apple-style-span" style="FONT-WEIGHT: bold; FONT-SIZE: 13px; FONT-FAMILY: arial"><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13px; font-weight: bold; ">Subject:</SPAN></SPAN></B><SPAN class="Apple-style-span" style="FONT-SIZE: 13px; FONT-FAMILY: arial"><SPAN class="Apple-style-span" style="font-family: arial; font-size: 13px; "> [whatwg] Canvas draw quality</SPAN></SPAN></DIV><DIV><FONT face="Arial" size="2"></FONT><BR></DIV><DIV>I would like to see a property added to the 2d canvas context that would allow quality to be lowered for drawing functions. Normally any time a shape is drawn, pixels close to the boundary are made semi transparent to make it look smooth, this is usually favourable but I have had a need to draw shapes and lines with pixel sharp boundaries in the same way as Java normally does. I would imagine that with the setting enabled, only the integer part of linewidth would be used. This setting would also affect drawing images, making them have no blurring or approximating when scaled or rotated.<SPAN class="Apple-converted-space"> </SPAN><BR><BR>This could easily be implemented without affecting old scripts, making a property such as lowQuality = true; (default false). Or perhaps allowing more control: a float from 0 (low quality) to 1 (high quality), and interperating null as 1 for backwards compatibility.<SPAN class="Apple-converted-space"> </SPAN><BR><BR>This property could also be handy in instaces where both fill() and stroke() are being called. Low quality could be used on the fill() to improve performace while stroke() could be used with high quality so it still draws smoothly.</DIV><DIV><FONT face="Arial" size="2"></FONT> </DIV></BLOCKQUOTE><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="FONT-SIZE: 10px; FONT-FAMILY: Arial"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">I think that the best way is just to define different values for the context ID:</SPAN></SPAN></FONT></DIV><PRE style="WHITE-SPACE: pre">DOMObject <A href="http://www.whatwg.org/specs/web-apps/current-work/#getcontext"><SPAN class="Apple-style-span" style="COLOR: rgb(0,0,238); WHITE-SPACE: pre; khtml-text-decorations-in-effect: underline; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); -khtml-text-decorations-in-effect: underline; white-space: pre; ">getContext</SPAN></SPAN></A>(in DOMString contextID);</PRE><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="FONT-SIZE: 10px; FONT-FAMILY: Arial"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">Something like "2D" and "2D-fast" or "2D-simple".</SPAN></SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="FONT-SIZE: 10px; FONT-FAMILY: Arial"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">Another option would be to add one optional parameter to the getContext() function.</SPAN></SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"></FONT> </DIV><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="FONT-SIZE: 10px; FONT-FAMILY: Arial"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">I doubt that someone will need to switch it in the middle of drawing so</SPAN></SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="FONT-SIZE: 10px; FONT-FAMILY: Arial"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">having such switch as an attribute is redundant.</SPAN></SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"></FONT> </DIV><DIV><FONT face="Arial" size="2"><SPAN class="Apple-style-span" style="FONT-SIZE: 10px; FONT-FAMILY: Arial"><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 10px; ">Andrew Fedoniouk.</SPAN></SPAN></FONT></DIV><DIV><FONT face="Arial" size="2"><A href="http://terrainformatica.com"><SPAN class="Apple-style-span" style="FONT-SIZE: 10px; COLOR: rgb(0,0,238); FONT-FAMILY: Arial; khtml-text-decorations-in-effect: underline; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: Arial; font-size: 10px; -khtml-text-decorations-in-effect: underline; ">http://terrainformatica.com</SPAN></SPAN></A></FONT></DIV><DIV><FONT face="Arial" size="2"></FONT> </DIV><DIV><FONT face="Arial" size="2"></FONT> </DIV><DIV><BR></DIV><BR class="Apple-interchange-newline"></SPAN></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE><BR class="Apple-interchange-newline"></SPAN></BLOCKQUOTE></DIV><BR></DIV></DIV></BODY></HTML>