C# GDI 阴影 圆角矩形 源代码 可用VS打开。
2022-09-01 15:24:09 122KB C# GDI 阴影 圆角矩形
1
unity 切圆角矩形,通过shader编码实现图片圆角
2022-08-31 15:33:29 208KB u3D圆角矩形
1
Unity的UI圆角矩形shader.unitypackage
2022-07-08 18:12:21 9KB unity 圆角矩形 shader
1
用java自带的抗锯齿画圆角矩形,效果比不开好很多! 主要代码: @Override public void paint(Graphics g) { super.paint(g); Graphics2D g2d = (Graphics2D) g; g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setColor(Color.blue); g2d.drawRoundRect(0, 0, 150, 30, 10, 10); }
2022-05-17 18:59:02 4KB java
1
unity无锯齿圆角矩形、圆形shader,可做圆形头像显示,Round Radiu的取值范围为0-0.5,输入0.5的时候为圆形。Width 和 Height的值输入图像的大小。
2022-04-06 03:05:27 4KB unity 游戏引擎 shader
1
主要代码: BufferedImage image = new BufferedImage(400, 120, BufferedImage.TYPE_4BYTE_ABGR); Graphics2D g2d = image.createGraphics(); g2d.setColor(Color.BLUE); //g2d.fillRoundRect(0, 0, 400, 120, 40, 40); BasicStroke stroke = new BasicStroke(4); g2d.setStroke(stroke); g2d.drawRoundRect(0, 0, 400, 120, 40, 40); g2d.dispose(); g2d = (Graphics2D) g; Image imgScale = image.getScaledInstance(100, 30, Image.SCALE_AREA_AVERAGING); g2d.drawImage(imgScale, 0, 0, null);
2022-03-22 16:57:05 5KB java
1
主要为大家详细介绍了Android中实现圆角矩形和圆形的方式,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
2022-02-22 11:00:02 90KB Android圆角矩形 Android圆形imageview
1
GDI+是对GDI的一个令人兴奋的扩展,但由于某些原因,它没有提供绘制圆角矩形的函数,虽然我们可以在GDI+中使用GDI中的函数,但这样一来我们没办法在圆角矩形中使用GDI+中的纹理和透明色等新特性。怎么办?GDI+中有一个GraphicsPath 的类,我们可以用它构造各种形状并且可用任何画刷来填充这些形状。本源码中提供了一个可以加到任何工程中的函数,并用它来绘制了一个圆角矩形,矩形的远郊程度可以通过一个滑动条来设置......Email:realman1981@,电话:13679278016 关键字:gdi+,graphicspath,圆角矩形
1
vc一个简单的圆角矩形算法,带demo和实现算法!
2021-11-28 18:54:19 49KB 圆角矩形
1
主要代码: @Override public void paintIcon(Component cmp, Graphics g, int x, int y) { Color lowerColor = new Color(235,255,235); Color highColor = new Color(81,184,77); Graphics2D g2d = (Graphics2D) g; g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON); // 画一个渐变圆角矩形 RoundRectangle2D.Float r2d=new RoundRectangle2D.Float(0, 0, btnWidth - 1, btnHeight - 1, 20, 20); Shape clip=g2d.getClip(); g2d.clip(r2d); GradientPaint paint = new GradientPaint(0.0F,0.0F,lowerColor,0.0F,btnHeight,highColor,true); g2d.setPaint(paint); g2d.fillRect(0,0,btnWidth,btnHeight); g2d.setClip(clip); // 画一个黑色边框 paint = new GradientPaint(0,0,new Color(0,0,0), 0,btnHeight-1,new Color(100,100,100)); g2d.setPaint(paint); g2d.drawRoundRect(0,0,btnWidth-1,btnHeight-1,20,20); // 画一个白色边框 paint=new GradientPaint(0,1,new Color(0,0,0,50),0,btnHeight-3,new Color(255,255,255,100)); g2d.setPaint(paint); g2d.drawRoundRect(1,1,btnWidth-3,btnHeight-3,18,18); FontMetrics fm = g2d.getFontMetrics(boldFont); int textWidth = fm.stringWidth(btnText); int textAscent = fm.getAscent(); g2d.setColor(hoverColor); g2d.setFont(boldFont); g2d.drawString(btnText, (btnWidth - textWidth) / 2, (btnHeight + textAscent) / 2 - 2); }
2021-11-20 15:16:41 24KB java
1