// See e575 The Quintessential Drawing Program
public void paint(Graphics g) {
// Retrieve the graphics context; this object is used to paint shapes
Graphics2D g2d = (Graphics2D)g; // Determine if antialiasing is enabled
RenderingHints rhints = g2d.getRenderingHints();
boolean antialiasOn = rhints.containsValue(RenderingHints.VALUE_ANTIALIAS_ON); // Enable antialiasing for shapes
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON); // Disable antialiasing for shapes
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_OFF); // Draw shapes...; see e586 Drawing Simple Shapes // Enable antialiasing for text
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON); // Draw text...; see e591 Drawing Simple Text // Disable antialiasing for text
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
}
Related Examples

e577. Enabling Antialiasing的更多相关文章

  1. SQL Server 2012安装错误案例:Error while enabling Windows feature: NetFx3, Error Code: -2146498298

    案例环境: 服务器环境 :    Windows Server 2012 R2 Standard 数据库版本 :    SQL Server 2012 SP1 案例介绍:   在Windows Ser ...

  2. OpenFlow:Enabling Innovation in Campus Networks

    SDN领域,OpenFLow现在已经成为了广泛使用的南向接口协议.若想好好学习SDN,在这个领域有所进步,需要熟悉OpenFlow协议.我最近找了篇有关OpenFLow的论文,发现最早该协议是在Sig ...

  3. win8.1中安装sql2014 0x800F0906 【 Error while enabling Windows feature : NetFx3, Error Code : -2146498298 】

    安装sql2012 需要安装net3.5  没有的话 安装不成功 Error while enabling Windows feature : NetFx3, Error Code : -214649 ...

  4. Zyxel Switch-How to block a fake DHCP server without enabling DHCP snooping?

    How to block a fake DHCP server without enabling DHCP snooping? Scenario How to block a fake DHCP se ...

  5. Enabling CORS in WCF

    Introduction This is an intermediate example of WCF as REST based solution and enabling CORS access, ...

  6. Antialiasing with Transparency

    Antialiasing with Transparency This sample demonstrates the GeForce 7 Series per-primitive super-sam ...

  7. Unity3d 超级采样抗锯齿 Super Sampling Anti-Aliasing

    Super Sampling Anti-AliasingSSAA算是在众多抗锯齿算法中比较昂贵的一种了,年代也比较久远,但是方法比较简单,主要概括为两步1.    查找边缘2.    模糊边缘这是一种 ...

  8. Enabling Active Directory Authentication for VMWare Server running on Linux《转载》

    Enabling Active Directory Authentication for VMWare Server running on Linux Version 0.2 - Adam Breid ...

  9. 14.8.1 Enabling File Formats

    14.8 InnoDB File-Format Management 14.8.1 Enabling File Formats 14.8.2 Verifying File Format Compati ...

随机推荐

  1. HDU--Elevator(水题)

    Elevator nid=24#time"> Time Limit: 1000ms   Memory limit: 32768K  有疑问?点这里^_^ 题目描写叙述 The high ...

  2. navicat 在写存储过程的时候总是说语法错误

    这个时候我们在sql的头部加上 DELIMITER $$ 尾部加上 $$DELIMITER;

  3. python3.3使用tkinter实现猜数字游戏代码

    发布时间:2014-06-18   编辑:www.jbxue.com 原文地址:http://www.jbxue.com/article/python/22152.html python3.3使用tk ...

  4. Altera FPGA管脚弱上拉电阻详细设置方法

    Altera FPGA管脚弱上拉电阻的软件设置方法 在使用 Altera 的 FPGA 时候, 由于系统需求, 需要在管脚的内部加上上拉电阻. Quartus II 软件中在 Assignment E ...

  5. cocos2d-x -- removeChild

    Test5::Test5() { CCSprite* sp1 = CCSprite::create(s_pPathSister1); CCSprite* sp2 = CCSprite::create( ...

  6. python(28)获得网卡的IP地址,如何在其他文件夹中导入python模块

    获得第几块网卡的ip地址: 如何在其他文件夹中导入模块 import sys sys.path.append('/search/chen/tool')#你的代码存放的目录 from Get_Ip im ...

  7. ftp实现文件上传(下载)

    例子代码 package getUrlPic; import java.io.ByteArrayInputStream; import java.io.IOException; import java ...

  8. Java-web-j2e学习建议路线【转】

    首先要明白Java体系设计到得三个方面:J2SE,J2EE,J2ME(KJAVA).J2SE,Java 2 Platform Standard Edition,我们经常说到的JDK,就主要指的这个,它 ...

  9. js事件委托及其原理

    1,什么是事件委托:通俗的讲,事件就是onclick,onmouseover,onmouseout,等就是事件,委托呢,就是让别人来做,这个事件本来是加在某些元素上的,然而你却加到别人身上来做,完成这 ...

  10. jquery全部版本

    http://www.jb51.net/zt/jquerydown.htm 这个地方实时更新jquery版本