shape

How to create a right facing arrow (chevron) using XML shapes in android? [closed]

夙愿已清 提交于 2019-12-20 08:49:11
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . How to create a right facing arrow using xml shapes in android like this?? 回答1: I've had a similar problem. Here's how I solved it: <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item> <shape> <solid android:color="@android:color/transparent"/> <size

Word VSTO - Filling a shape does not work in Word 2010 and Word 2013?

心已入冬 提交于 2019-12-20 05:46:09
问题 I use the following VB.NET (VSTO) code to add a shape in MS-Word, Dim app As Word.Application = Globals.ThisAddIn.Application Dim doc As Word.Document = app.ActiveDocument Dim left As Single = CSng(Convert.ToDouble(app.Selection.Information(Word.WdInformation.wdHorizontalPositionRelativeToPage))) Dim top As Single = CSng(Convert.ToDouble(app.Selection.Information(Word.WdInformation.wdVerticalPositionRelativeToPage))) Dim shape As Word.Shape = doc.Shapes.AddShape(1, left, top, 225.1F, 224.5F)

Combining LineGeometry with EllipseGeometry (in code, not XAML)

∥☆過路亽.° 提交于 2019-12-20 01:11:56
问题 I'm trying to create a custom shape with WPF. For starters I was just trying to create a simple line, that has a circle at each end (I know there are LineCaps, but that's not what I'm looking for). I've looked into some tutorials and the easiest way to do that, seems to use a CombinedGeometry . However I can't get it to work properly. Here is my code that creates the geometry object: protected override Geometry DefiningGeometry { get { Point ellipseCenter1 = new Point(X1 - this.CapDiameter /

Draw rectangle with XML shape settings in Android

浪子不回头ぞ 提交于 2019-12-19 10:53:28
问题 I've got a problem which I don't know how to solve. Please, help me if you can. In my app I have to create a custom view extended View. In this view I should draw a lot of rectangles and I create them by canvas.drawRect or canvas.drawRoundRect. It's clear. But I want to create a compound design of these rectangles (with gradients, corners, paddings and etc.) and I want to carry out these settings (gradients, corners, paddings and etc.) in XML. How can I do it? The problem is that I determine

Draw rectangle with XML shape settings in Android

别说谁变了你拦得住时间么 提交于 2019-12-19 10:53:02
问题 I've got a problem which I don't know how to solve. Please, help me if you can. In my app I have to create a custom view extended View. In this view I should draw a lot of rectangles and I create them by canvas.drawRect or canvas.drawRoundRect. It's clear. But I want to create a compound design of these rectangles (with gradients, corners, paddings and etc.) and I want to carry out these settings (gradients, corners, paddings and etc.) in XML. How can I do it? The problem is that I determine

Drawing a squircle shape on canvas (Android)

对着背影说爱祢 提交于 2019-12-19 04:08:46
问题 Here is what I'm using to draw a circle shape on to the canvas (and then an icon bitmap on it): private static Bitmap makeIcon(int radius, int color, Bitmap icon) { final Bitmap output = Bitmap.createBitmap(radius, radius, Bitmap.Config.ARGB_8888); final Canvas canvas = new Canvas(output); final Paint paint = new Paint(); paint.setAntiAlias(true); paint.setColor(color); canvas.drawARGB(0, 0, 0, 0); if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) canvas.drawCircle(radius / 2, radius /

Android drawable with background and gradient on the left

雨燕双飞 提交于 2019-12-19 03:18:10
问题 W would like to have a drawable which has background and gradient on the left that is about 10dp wide. Image of what I would like to achieve: Red gradient on the left Background on the rest How I can achieve that? I've tried layer-list with two shapes but with no luck. Item background: <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:drawable="@drawable/background" /> <item android:drawable="@drawable/gradient" /> </layer-list> Background drawable: <shape

Custom UIButton Shape without using an image

无人久伴 提交于 2019-12-18 15:53:32
问题 I want to make a UIButton with that looks similar to the UIBackBarButtonItem (with an arrow pointing left for the navigation stack. I would prefer to do this without having to use an image if possible because the button will have a different size depending on the phone's orientation. Is there a way to active this affect in code? My idea was using the CALayer of the button somehow. Thanks! EDIT I am trying to use @Deepak's advice, but I am running into a a problem. I want the right side of the

Create layer list with rounded corners programmatically

▼魔方 西西 提交于 2019-12-18 15:17:31
问题 I am currently trying to convert the following XML to be created programmatically so that I can set the top corners and bottom corners as needed throughout my project. It is a simple Layer list that has two rectangles; one on top of another. I would like to use this as a background for a few different views so it is important that the result scales. <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:bottom="20dp"> <shape android:shape="rectangle" > <size

R boxplot: How to customize the appearance of the box-and-whisker plots (e.g., remove lines or borders, change symbol of outliers)

戏子无情 提交于 2019-12-18 10:19:42
问题 Today, I was wondering how to customize the appearance of the box-and-whisker plots. E.g., I wanted to remove the line around the box. However, the problem is, that the border argument changes the color of all lines of the box-and-whisker plots simultaneously. So, if one has the great idea to set border = "white" then the whiskers are also going to “disappear” and you have a white line representing your median. As I could not find a solution on the internet dealing with exactly my problem, I