antialiasing

Drawing scaled bitmaps on a SurfaceView — no antialiasing

家住魔仙堡 提交于 2019-11-28 01:20:44
问题 I'm sorry if this topic has been brought before, but all my searches on the web and google groups did not help me. I'm currently developing a little game with the Android SDK, and use hi-res bitmaps that I resize accordingly to match the device's resolution (letting the system do it for me is not "crisp" enough). I use a SurfaceView, on which I paint in one pass a canvas filling the whole surface. The paint uses setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN)) to allow masking.

Avoiding lines between adjecent svg rectangles

我的未来我决定 提交于 2019-11-27 23:15:41
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 show between them. There's no way to force latest version browsers to avoid anti-aliasing for

Poor anti-aliasing of text drawn on Canvas

混江龙づ霸主 提交于 2019-11-27 23:11:11
I'm drawing text on Canvas, and am disappointed with the quality of antialiasing. As far as I've been able to determine, browsers don't do subpixel antialising of text on Canvas. Is this accurate? This is particularly noticeable on iPhone and Android, where the resulting text isn't as crisp as text rendered by other DOM elements. Any suggestions for high quality text out put on Canvas? Joubert My answer came from this link, maybe it will help someone else. http://www.html5rocks.com/en/tutorials/canvas/hidpi/ The important code is as follows. // finally query the various pixel ratios

Java Font Rendering

℡╲_俬逩灬. 提交于 2019-11-27 22:22:18
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 text and turn it back on after rendering text (so that other painting, like circles, etc, is AA'd). This

Disabling antialiasing on a WPF image [closed]

僤鯓⒐⒋嵵緔 提交于 2019-11-27 20:48:07
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 superimpose a label with the same text on top of the background image to achieve the same effect

How to draw smooth line in OpenGL with antialiasing?

邮差的信 提交于 2019-11-27 11:58:25
问题 I need to draw a smooth line in OpenGL and here is what I have done: glEnable( GL_LINE_SMOOTH ); glEnable( GL_POLYGON_SMOOTH ); glHint( GL_LINE_SMOOTH_HINT, GL_NICEST ); glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST ); glBegin( GL_LINE_STRIP ); for( UINT uiPoint = 0; uiPoint < iNumPoints; ++uiPoint ) { const Coord &Node = vecPoints[uiPoint]; glVertex3f( Node.x, Node.y, Node.z ); } glEnd(); What else I can do? 回答1: You can generate thin, screen-oriented polygons instead, and set the fragment's

Subpixel anti-aliased text on HTML5's canvas element

北城余情 提交于 2019-11-27 11:39:31
I'm a bit confused with the way the canvas element anti-aliases text and am hoping you all can help. In the following screenshot the top "Quick Brown Fox" is an H1 element and the bottom one is a canvas element with text rendered on it. On the bottom you can see both "F"s placed side by side and zoomed in. Notice how the H1 element blends better with the background: Here's the code I'm using to render the canvas text: var canvas = document.getElementById('canvas'); if (canvas.getContext){ var ctx = canvas.getContext('2d'); ctx.fillStyle = 'black'; ctx.font = '26px Arial'; ctx.fillText('Quick

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

那年仲夏 提交于 2019-11-27 11:32:58
This question already has an answer here: Forcing anti-aliasing using css: Is this a myth? 16 answers How can we apply Photoshop-like font anti-aliasing such as crisp, sharp, strong, smooth in CSS? Are these supported by all browsers? Gildas.Tambo 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; } Short answer: You can't. CSS does not have techniques which affect the rendering of fonts in the browser; only the system can do that. Obviously, text

Antialiasing edges of UIView after transformation using CALayer's transform

让人想犯罪 __ 提交于 2019-11-27 09:52:43
问题 I have a UIView object that rotates using CALayer 's transform: // Create uiview object. UIImageView *block = [[UIImageView alloc] initWithFrame....] // Apply rotation. CATransform3D basicTrans = CATransform3DIdentity; basicTrans.m34 = 1.0/-distance; blockImage.layer.transform = CATransform3DRotate(basicTrans, rangle, 1.0f, 0.0f, 0.0f); After rotating the edges of the object are not antialiasing. I need to antialias them. Help me, please. How can it be done? 回答1: One way to do this is by

Antialiasing not working in Three.js

时光怂恿深爱的人放手 提交于 2019-11-27 08:52:02
I am new to three.js and have starting working with it a lot recently. I really enjoy it and I have created some incredible things. However, I'm unsure why but when setting antialiasing to true I see no difference. renderer = new THREE.WebGLRenderer({ antialiasing: true }); I have searched for possible solutions, yet I can't seem to find or understand why this doesn't work. Is there something I am missing or need to in order to get antialiasing to work? EDIT: Links that helped me fix this issue: https://github.com/mrdoob/three.js/blob/master/examples/webgl_materials_normalmap2.html https:/