antialiasing

Change background colour of an anti-aliased image using C# with anti-aliasing

一个人想着一个人 提交于 2019-12-22 10:44:26
问题 I have an image where I need to change the background colour (E.g. changing the background of the example image below to blue). However, the image is anti-aliased so I cannot simply do a replace of the background colour with a different colour. One way I have tried is creating a second image that is just the background and changing the colour of that and merging the two images into one, however this does not work as the border between the two images is fuzzy. Is there any way to do this, or

Make edges of SKSpriteNode look smooth after rotation

百般思念 提交于 2019-12-22 10:40:04
问题 I create a SKSpriteNode like that: var shape:SKSpriteNode = SKSpriteNode(color: UIColor.redColor(), size: CGSizeMake(CGFloat(sizeOfShape), CGFloat(sizeOfShape))) How can I achieve, that a SKSpriteNode has still smooth edges, after I've rotated it. Currently, it looks like that: As you see, the edges are jagged. 来源: https://stackoverflow.com/questions/25532760/make-edges-of-skspritenode-look-smooth-after-rotation

Add 'fake' antialiasing to rotated rectangle

柔情痞子 提交于 2019-12-22 09:33:56
问题 I'm using Corona SDK, which fairly recently disabled antialiasing, without a way to re-enable it. I have several apps that use rotated rectangles and lines, and would like a way for to not look jagged. This image shows the difference: Is there a way to add some sort of antialiasing to these rectangles in Corona? I'd much prefer an antialias hack and be able to use new Corona features and fixes than use an old build with antialiasing.] Thanks! 回答1: You can use masks to your rects or images, it

ThreeJS SSAO with SSAA

吃可爱长大的小学妹 提交于 2019-12-22 01:02:34
问题 i'd like to integrate the SSAO-Shader (Screen Space Ambient Occlusion) into my antialiasing render stack (Super Sampling Anti-Aliasing). The AA is necessary for high-quality rendering, the default antialiasing delivered by my gpu isn't always sufficient. Now i've already integrated SSAO into the usual render process, but my new goal is to combine both techniques. For this, i've set up a fiddle. The first EffectComposer renders the scene onto a renderTarget with twice the resolution of the

Can u ? How to anti alias for SurfaceView in android?

会有一股神秘感。 提交于 2019-12-22 00:25:56
问题 This is a test project for antialias in Surface View and View, in the View : ( it's very good for antialias ) @Override protected void onDraw(Canvas canvas) { Paint p = new Paint(); p.setColor(Color.WHITE); canvas.setDrawFilter(new PaintFlagsDrawFilter(0, Paint.ANTI_ALIAS_FLAG|Paint.FILTER_BITMAP_FLAG)); canvas.drawColor(Color.BLACK); Matrix mMatrix = new Matrix(); mMatrix.postScale(0.34f, 0.34f); canvas.drawBitmap(mBitmap, mMatrix, p); canvas.drawText("View Anti alias", 100, 300, p); } in

Rendering SVG shapes with crisp edges in IE9

我们两清 提交于 2019-12-21 16:56:38
问题 IE9 appears not to honour the SVG shape-rendering="crispEdges" attribute. Here's a sample SVG: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" height="600" id="svgroot" version="1.1" width="800" x="0" y="0"> <line style="stroke:#000000;stroke-width:1px;stroke-opacity:1" y2="300" y1="300" x2="750" x1="50" shape-rendering="crispEdges" /> </svg> It appears correctly under Firefox and Safari, however the line appears blured under IE9 and IE10

Drawing rotated bitmap with anti alias

限于喜欢 提交于 2019-12-21 09:19:31
问题 I tried to paint a rotated bitmap with anti alias turned on, but it still has alias and it's not smooth, any help? I did as following: final Paint p = new Paint(Paint.ANTI_ALIAS_FLAG); p.setAntiAlias(true); canvas.rotate(-mValues[0]); canvas.drawBitmap(compass, -compass.getWidth()/2,-compass.getHeight()/2,p); 回答1: Paint.setAntiAlias() is for text. You want p.setFilterBitmap(true) ;. 回答2: In case you're rotating without a canvas (with createBitmap ), set filter to true . Example: private

Pygame draw anti-aliased thick line

北战南征 提交于 2019-12-21 04:18:08
问题 I used to draw lines (given some start and end points) at pygame like this: pygame.draw.line(window, color_L1, X0, X1, 2) , where 2 was defining the thickness of the line. As, anti-aliasing is not supported by .draw , so I moved to .gfxdraw and pygame.gfxdraw.line(window, X0[0], X0[1], X1[0], X1[1], color_L1) . However, this does not allow me to define the thickness of the line. How could I have thickness and anti-aliasing together? 回答1: After many trials and errors, the optimal way to do it

How can I inherit the system's anti-alias setting for painting text to off-screen images like swing does?

社会主义新天地 提交于 2019-12-21 04:03:22
问题 When I run my swing GUI applications under Java 6, they automatically use my configured sub-pixel anti-alias settings for all fonts. The result is much improved over standard AA options. But when I paint to an image I can find no way to initialize the graphics context to use the system's AA configuration. Trying to play around with Java's different AA hints is a lost cause because no sub-pixel method will work for all users. Is there any way to inherit system AA settings for a given graphics

How to antialias SVG text in Firefox

时间秒杀一切 提交于 2019-12-20 14:06:06
问题 Does anyone know the best way to anti-alias svg text that will work in Firefox? I tried text-antialias:true but this has no effect, and also I tried using a stroke paint but this just thickens up the font and is not what I like. Example: <!DOCTYPE html> <html> <body> <svg height="100" width="500"> <text y="50" x="250" text-anchor="middle" style="font-size: 40px" >Hello</text> </svg> </body> </html> I have uploaded this to http://jsfiddle.net/KJhrY/ This example appears antialiased in IE9 on