antialiasing

How to draw a decent looking Circle in Java

偶尔善良 提交于 2019-11-26 22:48:48
I have tried using the method drawOval with equal height and width but as the diameter increases the circle becomes worse looking. What can I do to have a decent looking circle no matter the size. How would I implement anti-aliasing in java or some other method. Brandon Yarbrough As it turns out, Java2D (which I'm assuming is what you're using) is already pretty good at this! There's a decent tutorial here: http://www.javaworld.com/javaworld/jw-08-1998/jw-08-media.html The important line is: graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); you can

IE 9 does not use sub-pixel antialiasing under certain conditions

安稳与你 提交于 2019-11-26 22:17:21
问题 [Original title: IE 9 text renders very poorly; is there a workaround? ) IE 9 is rendering the text in my application very poorly. The problem is not in my monitor's Clear Type settings, since IE 9 in compatibility mode, Firefox, and Chrome all render text nicely. Here's a side-by-side comparison of how the text is rendered with IE 9, IE 9 in compatibility mode, and Chrome: I tried applying this answer, but it doesn't seem to apply to anything after IE 7. Does anybody know of any workarounds

How do you enable anti aliasing in arbitrary Java apps?

大憨熊 提交于 2019-11-26 21:29:32
Many Java Apps don't use anti-aliased fonts by default, despite the capability of Swing to provide them. How can you coerce an arbitrary java application to use AA fonts? (both for applications I'm running, and applications I'm developing) If you have access to the source, you can do this in the main method: // enable anti-aliased text: System.setProperty("awt.useSystemAAFontSettings","on"); or, (and if you do not have access to the source, or if this is easier) you can simply pass the system properties above into the jvm by adding these options to the command line: -Dawt

Java Font Rendering

二次信任 提交于 2019-11-26 20:58:12
问题 I have been attempting to enhance my GUI system written in Java to use subpixel antialiasing and have been successful, except for two remaining anomalies. This is a follow on to my other question from a few weeks ago. The first problem is that setting rendering hints KEY_ANTIALIASING to VALUE_ANTIALIAS_ON causes KEY_TEXT_ANTIALIASING to be ignored when it is set to an LCD (subpixel) AA value. Can anyone shed some light on this? Currently I am forced to VALUE_ANTIALIAS_OFF before rendering

Disabling antialiasing on a WPF image [closed]

半城伤御伤魂 提交于 2019-11-26 20:27:37
问题 I'm writing a small Login dialog, and have embedded a banner at the top of the dialog for aesthetic reasons. All went well, except that by default, WPF anti aliases the entire image, making the text that was contained within it frustrating blurry. After a bit of searching, the first few pages of results showed that it's common belief that anti aliasing cannot be disable in WPF. Can any confirm, or otherwise deny this? It's a minor issue for me - I'll take the text out of the image and instead

OpenGL ES iPhone - drawing anti aliased lines

拜拜、爱过 提交于 2019-11-26 18:11:09
Normally, you'd use something like: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); glEnable(GL_LINE_SMOOTH); glLineWidth(2.0f); glVertexPointer(2, GL_FLOAT, 0, points); glEnableClientState(GL_VERTEX_ARRAY); glDrawArrays(GL_LINE_STRIP, 0, num_points); glDisableClientState(GL_VERTEX_ARRAY); It looks good in the iPhone simulator, but on the iPhone the lines get extremely thin and w/o any anti aliasing. How do you get AA on iPhone? One can achieve the effect of anti aliasing very cheaply using vertices with opacity 0. Here's an image example to explain: Comparison with AA:

How to apply font anti-alias effects in CSS? [duplicate]

你说的曾经没有我的故事 提交于 2019-11-26 18:03:38
问题 This question already has answers here : Forcing anti-aliasing using css: Is this a myth? (16 answers) Closed 5 years ago . How can we apply Photoshop-like font anti-aliasing such as crisp, sharp, strong, smooth in CSS? Are these supported by all browsers? 回答1: here you go Sir :-) 1 .myElement{ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; } 2 .myElement{ text-shadow: rgba(0,0,0,.01) 0 0 1px; } 回答2: Short answer: You can't. CSS

HTML5 Canvas and Anti-aliasing

余生颓废 提交于 2019-11-26 17:33:16
How to turn on the anti-aliasing on an canvas . The following code doesn't draw a smooth line: var context = mainCanv.getContext("2d"); if (context) { context.moveTo(0,0); context.lineTo(100,75); context.strokeStyle = "#df4b26"; context.lineWidth = 3; context.stroke(); } Gaurav Anti-aliasing cannot be turned on or off, and is controlled by the browser. Can I turn off antialiasing on an HTML <canvas> element? You may translate canvas by half-pixel distance. ctx.translate(0.5, 0.5); Initially the canvas positioning point between the physical pixels. I haven't needed to turn on anti-alias because

3D CSS transform, jagged edges in Firefox

霸气de小男生 提交于 2019-11-26 17:12:21
Similary to " css transform, jagged edges in chrome ", same occurs with Firefox on 3D transforms, eg: http://jsfiddle.net/78d8K/5/ (<- remember: Firefox ) This time, backface-visibility doesn't help :( Any idea? Edited answer: (after comments) "Workaround", add a transparent outline attribute: outline: 1px solid transparent; Tested on Firefox 10.0.2 Windows 7: http://jsfiddle.net/nKhr8/ Original answer: (background-color dependent) "Workaround", add a border attribute with the same color of your background (white this case): border: 1px solid white; Tested on Firefox 10.0.2 Windows 7: http:/

Avoiding lines between adjecent svg rectangles

北战南征 提交于 2019-11-26 16:56:43
问题 Although there's some standardized options for hinting the browser about anti-aliasing in svg, none of them seems to work for my case where I have rectangles with rounded corners - and therefore can't afford turning off anti-aliasing. Although my rectangles are sized to leave no vertical spaces between them, a thin line shows between them, due to the effects of anti-aliasing. E.g. my svg has one rectangle end at pixel 80 and the next one starts at 81, but still they get a thin background line