antialiasing

Canvas does not draw smooth lines

社会主义新天地 提交于 2019-12-01 04:13:55
I am not able to get anitialiazed lines when doing freehand drawing in javafx canvas. Following is the code ... import javafx.application.*; import javafx.event.*; import javafx.scene.*; import javafx.scene.canvas.*; import javafx.scene.control.*; import javafx.scene.input.*; import javafx.scene.shape.*; import javafx.stage.*; public class Test2 extends Application { GraphicsContext gc; public static void main(String[] args) { launch(args); } private class MouseDragged implements EventHandler<MouseEvent> { public void handle( MouseEvent e ) { gc.lineTo( e.getX(), e.getY() ); gc.stroke(); } }

OpenGL antialiasing without the accumulation buffer

不羁岁月 提交于 2019-12-01 03:01:22
问题 On an NVIDIA card I can perform full scene anti-aliasing using the accumulation buffer something like this: if(m_antialias) { glClear(GL_ACCUM_BUFFER_BIT); for(int j = 0; j < antialiasing; j++) { accPerspective(m_camera.FieldOfView(), // Vertical field of view in degrees. aspectratio, // The aspect ratio. 20., // Near clipping 1000., JITTER[antialiasing][j].X(), JITTER[antialiasing][j].Y(), 0.0, 0.0, 1.0); m_camera.gluLookAt(); ActualDraw(); glAccum(GL_ACCUM, float(1.0 / antialiasing));

Canvas does not draw smooth lines

自古美人都是妖i 提交于 2019-12-01 01:45:40
问题 I am not able to get anitialiazed lines when doing freehand drawing in javafx canvas. Following is the code ... import javafx.application.*; import javafx.event.*; import javafx.scene.*; import javafx.scene.canvas.*; import javafx.scene.control.*; import javafx.scene.input.*; import javafx.scene.shape.*; import javafx.stage.*; public class Test2 extends Application { GraphicsContext gc; public static void main(String[] args) { launch(args); } private class MouseDragged implements EventHandler

Anti-aliased font in HTML page

China☆狼群 提交于 2019-11-30 21:14:40
Is there a good way to create crisp, clear, LARGE font in webpages? I need to create a tag cloud effect on my homepage with different font sizes and colours. I've got it set up in HTML/CSS but on the older browsers or OS's which don't support anti-aliasing as default it looks a bit... crappy. I've played with sIFR , which worked beautifully but gave me some horrible load effects but I'm now wondering if there is a way to: a) do browser/OS detection to split users by browser/OS combinations which I KNOW support anti-aliasing (they get raw HTML) and by "others" who get an image tag. b) Some sort

UIImage's drawInrect: smoothes image

蓝咒 提交于 2019-11-30 17:24:07
I'm trying to draw image using UIImage 's drawInRect: method. Here is the code: UIImage *image = [UIImage imageNamed:@"OrangeBadge.png"]; UIGraphicsBeginImageContext(image.size); [image drawInRect:CGRectMake(0, 0, image.size.width, image.size.height)]; UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); The problem is that the resulting image is blurry. Here is the resulting image (on the right side) compared to the source image (on the left side): I've tried both CGContextSetAllowsAntialiasing(UIGraphicsGetCurrentContext(), NO)

Draw emf antialiased

扶醉桌前 提交于 2019-11-30 09:27:49
Is there a way to draw an emf metafile (exported form a drawing tool) with antialiasing enabled? The tools I tried are not capable of exporting emf files antaliased so I wondered if I can turn it back on manually when drawing the emf in the OnPaint override of my Controls. If anyone can confirm that is technically possible to generate antialiased emf files, another solution would be to use a drawing tool that can export to antialiased emf or have a 3rd party converter do this later. If anyone knowns such a tool, please let me know. EDIT: When looking at the emf instructions it doesn't seem

Why are the Tkinter canvas lines jagged?

风流意气都作罢 提交于 2019-11-30 08:31:36
问题 The lines drawn on a Tkinter.Canvas are not smooth. How can they be made smooth? Here's what I tried: from Tkinter import * root = Tk() cv = Canvas(root,bg = 'white') rt1 = cv.create_rectangle(10,10,110,110,width = 8,tags = ('r1','r2','r3')) def printRect(event): print 'rectangle' def printLine(event): print 'line' cv.tag_bind('r1','<Button-1>',printRect) cv.tag_bind('r1','<Button-3>',printLine) cv.create_line(10,20,200,200,width = 5,tags = 'r1') cv.pack() root.mainloop() Here's what it looks

Disable antialiasing inside Xcode?

。_饼干妹妹 提交于 2019-11-30 08:28:30
问题 How does one disable antialiasing inside the code editor in Xcode, but not system-wide? 回答1: For Xcode 3.x the necessary terminal command is: defaults write com.apple.xcode AppleAntiAliasingThreshold <some integer value> For Xcode 4 & 5 it is: defaults write com.apple.dt.Xcode AppleAntiAliasingThreshold <some integer value> For Xcode 6 you may first need to enter the following at a terminal console: defaults write com.apple.dt.Xcode NSFontDefaultScreenFontSubstitutionEnabled YES Then, as per

Anti-aliased font in HTML page

老子叫甜甜 提交于 2019-11-30 05:14:02
问题 Is there a good way to create crisp, clear, LARGE font in webpages? I need to create a tag cloud effect on my homepage with different font sizes and colours. I've got it set up in HTML/CSS but on the older browsers or OS's which don't support anti-aliasing as default it looks a bit... crappy. I've played with sIFR, which worked beautifully but gave me some horrible load effects but I'm now wondering if there is a way to: a) do browser/OS detection to split users by browser/OS combinations

Can I draw with antialiasing on canvas?

微笑、不失礼 提交于 2019-11-30 04:11:14
Can I draw with anti-aliasing on canvas? I need my circles and line have smooth edges. Drawing operations want Paint . In this Paint you set Paint.setFlags(Paint.ANTI_ALIAS_FLAG) Check this out. It fairly uses smooth edges.. http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/FingerPaint.html The paint properties needed to get anti-aliasing is : mPaint = new Paint(); mPaint.setAntiAlias(true); For drawing use: mPath = new Path(); mPath.reset(); mPath.moveTo(x, y);//can be used where to trigger the path onDraw method should contain: canvas.drawPath