rounded-corners

Bitmap repeat + rounded corners

蓝咒 提交于 2019-11-30 09:00:42
问题 I am trying to create rectangle with rounded corners and background as repeated bitmaps. I am writing like this, but getting bitmaps in the corners. Could anyone help out? background.xml <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape> <stroke android:width="1dp" android:color="#FFFFFF" /> <corners android:radius="50dp" /> </shape> </item> <item> <bitmap android:src="@drawable/carbon_4" android:tileMode="repeat" /> <

Rounded corner ImageView - Android

谁说我不能喝 提交于 2019-11-30 07:45:22
I try to create imageview with rounded corners.i searched and found xml code <?xml version="1.0" encoding="utf-8"?> <solid android:color="#00ffffff" /> <padding android:bottom="6dp" android:left="6dp" android:right="6dp" android:top="6dp" /> <corners android:radius="12dp" /> <stroke android:width="6dp" android:color="#ffffffff" /> and this is a my imageview xml code <ImageView android:id="@+id/slidemenuuserimage" android:layout_width="90dp" android:layout_height="90dp" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_marginBottom="16dp" android

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

痞子三分冷 提交于 2019-11-30 06:58:15
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? Nadia Alramli 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('border.png') source = border.convert('RGB') img.paste(source, mask=border) The mask can be resized

Top-left and -right corner rounded in Javafx/CSS

早过忘川 提交于 2019-11-30 06:28:27
I would like to create a Pane with 2 rounded corners top-left and top-right, how can i do this in javafx? I know that u can use "border-top-left-radius" in normal css but it wont work under javafx. Until now I tried: .calendar { -fx-border-top-left-radius: 10px; -fx-border-top-right-radius: 10px; } Thanks in advance, Zombie .calendar{ -fx-border-radius: 10 10 0 0; -fx-background-radius: 10 10 0 0; /* top-left, top-right, bottom-right, and bottom-left corners, in that order. */ } 来源: https://stackoverflow.com/questions/16564818/top-left-and-right-corner-rounded-in-javafx-css

Rounded corners for <input type='text' /> using border-radius.htc for IE

痴心易碎 提交于 2019-11-30 06:23:20
I want to create an input fields with rounded corners. HTML: <div id="RightColumn"> <input type="text" class="inputForm" /> </div> CSS: .inputForm { -moz-border-radius:10px; /* Firefox */ -webkit-border-radius: 10px; /* Safari, Chrome */ -khtml-border-radius: 10px; /* KHTML */ border-radius: 10px; /* CSS3 */ behavior:url("border-radius.htc"); } #RightColumn { background-color:White; } But IE doesn't show any borders for input fields - neighter rounded nor simple borders. When I remove CSS-style for #RightColumn, IE shows an input fields with rounded corners. But I need background for

how to get rounded edges on UITableViewCell's in a manner that allows cell background color to be user selected? (but not using the GROUPED mode)

大憨熊 提交于 2019-11-30 05:37:01
Is there a way to get rounded edges on UITableViewCell's in a manner that: allows cell background color to be user selected/customised at run time (cells may not all have the same background color) not using the UITableView "GROUPED" mode So I'm assuming this means I can't use the normal image approach here to get rounded edges, as in this case it would not allow for requirement 1 above Matthew Gillingham Well, it sounds like you should give using CALayer a try. Since a UITableViewCell is a UIView subclass, you can manipulate its CALayer property. So, first, make sure to #import <QuartzCore

How to create a partially-rounded-corners-rectangular drawable with center-crop and without creating new bitmap?

二次信任 提交于 2019-11-30 05:31:16
问题 Background I've already seen how to create a drawable that's circular out of a bitmap, and also how to add an outline (AKA stroke) around it, here. The problem I can't find out how to do a similar task for rounding only some of the corners of the bitmap, inside the drawable, without creating a new bitmap, and still do it for a center-crop ImageView. What I've found This is what I've found, but it does create a new bitmap, and when using it in an imageView with center-crop (source here): /** *

How to draw a rounded NSImage

∥☆過路亽.° 提交于 2019-11-30 04:02:36
I am trying to create a NSImage or NSImageCell with rounded corners inside a NSTableView . I can't get anything to work. Here is the best I have so far inside my custom NSCell : - (void)drawInteriorWithFrame:(NSRect)frame inView:(NSView *)controlView { if (thumbnailLink) { NSURL *url = [NSURL URLWithString:thumbnailLink]; if (url) { NSRect imageFrame = [self _imageFrameForInteriorFrame:frame]; NSImage *image = [[NSImage alloc] initWithContentsOfURL:url]; [image setScalesWhenResized:YES]; [image setSize:NSMakeSize(IMAGE_HEIGHT, IMAGE_WIDTH)]; [NSGraphicsContext saveGraphicsState]; imageFrame =

Android: give a webview rounded corners?

泪湿孤枕 提交于 2019-11-30 01:32:06
问题 I'm trying to give my webView rounded corners. Here is my code: rounded_webview.xml: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:padding="10dp"> <solid android:color="#000"/> <corners android:bottomRightRadius="15dp" android:bottomLeftRadius="15dp" android:topLeftRadius="15dp" android:topRightRadius="15dp"/> </shape> And here is my webView: <WebView android:id="@+id/webView1" android:layout_width=

Android custom alert dialog with rounded corners and transparent background

戏子无情 提交于 2019-11-29 23:25:13
问题 I have created a custom AlertDialog with rounded corners using onDraw of LinearLayout as below, public class RoundedLinearLayout extends LinearLayout { private Paint drawPaint; private Paint roundPaint; private int mCornerRadius = 100; private RectF bounds; @TargetApi(Build.VERSION_CODES.HONEYCOMB) public RoundedLinearLayout(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); onInit(); } public RoundedLinearLayout(Context context, AttributeSet attrs) { super