e577. Enabling Antialiasing
// 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的更多相关文章
- SQL Server 2012安装错误案例:Error while enabling Windows feature: NetFx3, Error Code: -2146498298
案例环境: 服务器环境 : Windows Server 2012 R2 Standard 数据库版本 : SQL Server 2012 SP1 案例介绍: 在Windows Ser ...
- OpenFlow:Enabling Innovation in Campus Networks
SDN领域,OpenFLow现在已经成为了广泛使用的南向接口协议.若想好好学习SDN,在这个领域有所进步,需要熟悉OpenFlow协议.我最近找了篇有关OpenFLow的论文,发现最早该协议是在Sig ...
- 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 ...
- 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 ...
- Enabling CORS in WCF
Introduction This is an intermediate example of WCF as REST based solution and enabling CORS access, ...
- Antialiasing with Transparency
Antialiasing with Transparency This sample demonstrates the GeForce 7 Series per-primitive super-sam ...
- Unity3d 超级采样抗锯齿 Super Sampling Anti-Aliasing
Super Sampling Anti-AliasingSSAA算是在众多抗锯齿算法中比较昂贵的一种了,年代也比较久远,但是方法比较简单,主要概括为两步1. 查找边缘2. 模糊边缘这是一种 ...
- 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 ...
- 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 ...
随机推荐
- 使用NuGet发布自己的.NET NuGet 包( .NET Standard & Windows)
发布自己的nuget包 STEP 1:获取API Key 首先,你需要到NuGet上注册一个新的账号,然后在My Account页面,获取一个API Key,或者是自建服务器上生成一个API Key( ...
- [转]HSPICE软件的应用及常见问题解决
HSPICE常用分析类型 直流分析(DC Analysis)( 参见HSPICE User’s Manual (1)3-4 ) 常用命令: .OP 直流工作点分析 .NODESET 节点设置 .SEN ...
- mysql-5.7.20 版本的 mysql-group-replication 可用性测试报告
一.喜迎 mysql-5.7.20 事实上mysql-group-replication 功能是在mysql-5.7.17这个版本上引入的,它实现了mysql各个结点间数据强一致性, 这个也成为了我 ...
- NodeJS错误处理最佳实践
NodeJS的错误处理让人痛苦,在很长的一段时间里,大量的错误被放任不管.但是要想建立一个健壮的Node.js程序就必须正确的处理这些错误,而且这并不难学.如果你实在没有耐心,那就直接绕过长篇大论跳到 ...
- 分享下今天研究的流量上限DDos攻击分析和解决方式
分享下今天研究的流量上限DDos攻击分析和解决方式 常常听到或者碰到某个站点被攻击.一般都是流量攻击.今天自己写了个程序測下相关的上限,程序仅仅简单做了个get html操作(不包括图片等资源文件). ...
- Let's call it a "return"
Preface Long time no see. For some reason that I failed to keep updating this blog, which is really ...
- THINKPHP导入全部post参数
@extract($_POST);//导入全部POST参数直接使用变量
- You have JVM property "https.proxyHost" set to “localhost”
Mac下Pycharm和AndroidStudio里面proxy配置页都提示这个,后来在~/.gradle/gradle.properties里面找到了proxy设置代码,删掉就好了.
- angular学习笔记(二十一)-$http.get
基本语法: $http.get('url',{}).success(function(data,status,headers,config){}).error(function(data,status ...
- PairRDD中算子combineByKey图解
1.combineByKey combine 为结合意思. 作用: 将RDD[(K,V)] => RDD[(K,C)] 表示V的类型可以转成C两者可以不同类型. def combineBy ...