rounded-corners

How to rounded the corners when I draw rectangle using UIBezierPath points

懵懂的女人 提交于 2019-12-04 09:44:08
问题 I crated a rectangle using UIBezierPath adding point by point, now I want to rounded the corners of this rectangle but seems there are no way to do it. can anyone help me ? class RectangleLayer: CAShapeLayer { let animationDuration: CFTimeInterval = 0.5 override init() { super.init() fillColor = Colors.clear.CGColor lineWidth = 5.0 path = rectanglePathStart.CGPath } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } var rectanglePathStart:

Rounded corners in Chrome not working

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 07:47:49
I am using the following for achieving rounded corners: -moz-border-radius: 10px; border-radius: 10px; -webkit-border-radius: 10px; This is working in all browsers (excluding IE though) except Chrome. Here is how it looks in Chrome: but the same page is displayed fine in Safari. Being Webkit browsers why is there a difference in between these two browser displays? This is how it looks in Safari: Why is this happening? Here is the mark-up I am using: html: div#one1 { position: relative; border-bottom: solid 2px #2D2DFF; width: 800px; height: 100px; color: #FFF; -moz-border-radius-topleft: 10px;

How to create a rounded rectangle label in Xcode 7 and Swift 2

你。 提交于 2019-12-04 05:35:30
I am working in Xcode 7 beta 3. I want to create a label with a rounded rectangle background. By default, I can create a background with my color of choice but I can't round the corners. I have tried creating an outlet for that label and then in viewDidLoad() I wrote this code label.layer.cornerRadius = 10 . I didn't get any errors but it didn't change the label in the simulator. Does anyone know how to do this in Swift 2? The most simplest approach is to add this attribute to the label you want to have rounded corners. layer.cornerRadius And also enable Clip Subviews property as well. You'll

How do I create a WPF rounded container that clips children?

蹲街弑〆低调 提交于 2019-12-04 04:09:17
问题 The following piece of code is supposed to draw a menu bar inside a rounded container. You'll notice that the bottom is rounded, but the corners of the menu aren't. I followed the directions of chosen answer because it appeared to be the most efficient: How do I create a WPF Rounded Corner container? For the record, I am running .NET 4.5 with the latest version of WPF. Here's my code: <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft

How to make rounded tabs with css? [closed]

不羁岁月 提交于 2019-12-04 03:47:50
I'm wondering if it's possible to archive the following effect with CSS I found these articles that kind of help but the problem is that in my case the tab sides are diagonal not straight vertical lines: http://css-tricks.com/tabs-with-round-out-borders/ http://css-tricks.com/better-tabs-with-round-out-borders/ Is it possible to do? Here's a proof of concept example with pure CSS. It uses pseudo-elements and rotate . It's pretty close to your source image and could get closer with some work. Demo : http://jsfiddle.net/csDP9/9/ HTML : <ul> <li>Sample 1</li> <li class="active">Sample 2</li> <li

smooth rounded corners in swing

谁说我不能喝 提交于 2019-12-03 22:38:16
I want to make smooth rounded corners for my swing application, but I can't get my desired result... here's the screenshots: 1. setShape() for JFrame : 2.overriding paintComponent() method for JPanel instead of using setShape() : 3. setBackground(new Color(0, 0, 0, 0)) for JFrame : well, but there's a problem with text quality: before step 3 : after step 3 : guys I'm confused, I've searched many times but nothing helped me... what should I do? please help me here's the full code : public class WelcomePage extends JFrame { private Point initialClick; private boolean end = false; private JLabel

Any way to make nice antialiased round corners for images in python?

让人想犯罪 __ 提交于 2019-12-03 19:15:02
问题 Is there any way to make nice round corners with python? Currently PIL and GD2 are used in my project. Both of them have an arc() method, that allows you to draw a quater-circle, but the quater-circle is not antialiased, so the image looks crispy. Is there any neat way to make antialiased/smooth round corners? 回答1: What I usually do is use an image as a mask, like this one for example: border.png alt text http://nadiana.com/sites/default/files/pil_tutorial/border.png border = Image.open(

changing color of rounded corners button with CSS

牧云@^-^@ 提交于 2019-12-03 18:18:00
问题 thanks a bunch in advance! i was able to make a rounded corner button using CSS. i like to be able to mouseover the button, and the entire thing changes its color, not just the inner most div. plz help! my assumption is that iam supposed to have some kinda javascript with onmouseover="", correct? here's the page: http://biozenconsulting.com/new/ (also, how do i get rid of the small boxes that appear on the right corners when viewed in IE8 and Chrome?) this is the HTML code: <div class="nav

Rounded Rectangle Not Accurate

巧了我就是萌 提交于 2019-12-03 18:03:22
问题 Every sample code I've ever found for drawing rounded rectangles using GDI+ goes something like this (lifted and slightly modified from BobPowell.net): Private Sub Panel1_Paint(ByVal sender As Object, ByVal e As PaintEventArgs) Handles Panel1.Paint e.Graphics.Clear(SystemColors.Window) e.Graphics.SmoothingMode = SmoothingMode.None Call DrawRoundRect(e.Graphics, Pens.Red, 10, 10, 48, 24, 6) End Sub Public Sub DrawRoundRect(ByVal g As Graphics, ByVal p As Pen, ByVal x As Single, ByVal y As

Rounded corners for an Imageview in android

北城余情 提交于 2019-12-03 16:12:19
I have a textview and imageview inside a linearlayout. Textview is at top and imageview at bottom. I used below lines to have rounded corners for linearlayout. But imageview corners are not rounding. I see only top corners of linearlayout are rounding. How can i have rounded bottom corners of imageview? ( I see all the corners are rounded if i remove imageview) rounded_corners.xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <solid android:color="#ffffff" /> <corners android:bottomLeftRadius="8dp" android