antialiasing

SKTexture nearest filtering mode doesn't work (Making Pixel Art)

孤人 提交于 2019-12-10 06:10:38
问题 I used a relatively small image (44pixel tall) and scaled it up to have a pixel art look. I tried to change the filtering mode to nearest so the anti-aliasing would disappear but it didn't. It appears with blurry edges. I tried the same with a background getting the same result. let myNode = SKSpriteNode() class GameScene: SKScene { func makeNode() { myNode.position = CGPoint(x: self.frame.size.width/2, y: self.frame.size.height/2) myNode.size = CGSize(width: 200, height: 200) myNode.texture

ANTI_ALIAS_FLAG for ImageView within layout?

僤鯓⒐⒋嵵緔 提交于 2019-12-09 16:32:40
问题 Does anyone know how to apply the ANTI_ALIAS_FLAG to ImageView 's in layouts rather than in Java? 回答1: You want to apply the attribute android:antialias="true" , like so: <ImageView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:antialias="true" /> 回答2: 2013-year-way: declare special xml resource describing ImageView's content. For example we want an ImageView to contain

Problem with poor font rendering with CSS3 transitions, jQuery, & Google Fonts

ぃ、小莉子 提交于 2019-12-09 10:20:27
问题 In Firefox, there is no problem. Here's an image: http://cl.ly/3R0L1q3P1r11040e3T1i In Safari, the text is rendering poorly: http://cl.ly/0a1101341r2E1D2d1W46 In IE7 & IE8, it's much worse, but I don't have a picture. Sorry :( I'm using Isotope jQuery plugin, and the CSS3 transitions seem to cause the poor font-rendering. I'm also using Google Font API. Here's what the CSS transitions for Isotope are written as: /**** Isotope CSS3 transitions ****/ .isotope, .isotope .isotope-item { -webkit

GDI+ Bug: Anti-Aliasing White On Transparency

落爺英雄遲暮 提交于 2019-12-08 18:49:29
The following code will create a transparent bitmap and then draw a white ellipse on it with anti-aliasing. using(var background = new Bitmap(500, 500)) using (var graphics = Graphics.FromImage(background)) { graphics.SmoothingMode = SmoothingMode.AntiAlias; graphics.Clear(Color.Transparent); graphics.DrawEllipse(new Pen(Color.White, 50), 250, 250, 150, 150); background.Save("test.png", ImageFormat.Png); } The bug I have found is that the anti-aliased pixels around the edge of the ellipse have an unexpected color. They have RGB values of (254,254,254) instead of (255,255,255). Since GDI+

Enabling antialising in SlimDX (D3D9)

二次信任 提交于 2019-12-08 13:43:05
问题 I would like to enable antialiasing when drawing triangles like on the following picture: I found a way to do it with XNA on this page but I want to do the same with SlimDX . 回答1: On SlimDX/Directx9, when you create your swapchain, use this in PresentParameters: Multisample = MultisampleType.FourSamples, MultisampleQuality = 4 Also make sure that the multisample state is on (By default it is, but never sure): device.SetRenderState(RenderState.MultisampleAntialias, true); There's of course

Antialiasing on OpenGL ES 2.0

梦想的初衷 提交于 2019-12-08 07:08:43
问题 How can I do antialiasing on triangles on the entire render? Should I put it on the fragmentShader? Is there any other good solution to improve this sort of thing? Here is my "view", with very crispy edges (not very nice). 回答1: After doing some Deep research, I found that It's in fact pretty simple, and the most comonly done is to render like there was a screen 4 times bigger (or even more than 4 times). After rendering to this much more bigger screen, the GPU will take the avarege of that

Java Write Text Image with Specific Fonts

删除回忆录丶 提交于 2019-12-08 04:05:40
问题 I'm writing some text on top of an existing image and the font isn't very sharp. Is there some settings either with the Graphics2D or Font classes that help make fonts look nicer when writing text on top of images? The Dante font doesn't come out as Dante when I write it. I've tried to use antialiasing but it had no effect (see setRenderingHint). The images came out the same with or without the RenderingHint set. Any suggestions? public class ImageCreator{ public void createImage(String text)

GDI+ Bug: Anti-Aliasing White On Transparency

半世苍凉 提交于 2019-12-08 03:18:44
问题 The following code will create a transparent bitmap and then draw a white ellipse on it with anti-aliasing. using(var background = new Bitmap(500, 500)) using (var graphics = Graphics.FromImage(background)) { graphics.SmoothingMode = SmoothingMode.AntiAlias; graphics.Clear(Color.Transparent); graphics.DrawEllipse(new Pen(Color.White, 50), 250, 250, 150, 150); background.Save("test.png", ImageFormat.Png); } The bug I have found is that the anti-aliased pixels around the edge of the ellipse

WPF Shader Effect - antialiasing not showing

痞子三分冷 提交于 2019-12-07 19:03:32
问题 I am running to a problem where I have a WPF shader effect (modified from Rene Schulte) to simulate Dot Matrix Display (DMD). Everything works great, but all dots are aliased. See attached image. I tried many features within WPF, to bring antialiasing, nothing to do. in constructor (image within a textbox); RenderOptions.SetBitmapScalingMode(MarqueeTB, BitmapScalingMode.HighQuality); RenderOptions.SetEdgeMode(MarqueeTB, EdgeMode.Unspecified); RenderOptions.SetClearTypeHint(MarqueeTB,

Anti-aliasing artifacts in WPF

我只是一个虾纸丫 提交于 2019-12-07 18:12:31
问题 I have a bizarre rendering issue when I'm trying to use anti-aliased graphics in WPF. Here's a simplified version. If I use the following XAML <Window x:Class="RenderingBug.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Width="300" Height="300"> <Grid Name="myGrid" Background="AntiqueWhite" Width="250" Height="250"> <ScrollViewer Name="myScrollViewer" HorizontalScrollBarVisibility="Auto"