shape

how to make imageview border with two color and fix size border width in andorid

爱⌒轻易说出口 提交于 2019-12-08 05:17:32
I have create the circularimageview and this image view set the two colors and this color sizw are same how to set border with fix size and two borders? **I have already use library 'com.pkmmte.view:circularimageview:1.1' ** #ce90ce inner circle # ab84ab outer circle ineer circle opacity 20% outer circle opacity 15% My Image like this My Adapter Layout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/Background_Main"

Transforming a custom Shape in WPF

耗尽温柔 提交于 2019-12-08 04:56:56
问题 I have a custom shape in WPF that creates two rectangles in the DefiningGeometry override and returns both as a GeometryGroup as follows: protected override System.Windows.Media.Geometry DefiningGeometry { get { System.Windows.Media.GeometryGroup group = null; System.Windows.Media.RectangleGeometry rectangle = null; group = new System.Windows.Media.GeometryGroup(); if (this.Rectangle.IsEmpty) { group.Children.Add(System.Windows.Media.Geometry.Empty); } else { rectangle = new System.Windows

how to create a semi oval shape (bending a line)

徘徊边缘 提交于 2019-12-08 04:27:39
问题 I'm trying to create a custom shape for my NavigationView footer, as background. but it's not so clean. This is what I have done: And this is what I need: Code: <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:gravity="bottom"> <shape android:shape="rectangle"> <solid android:color="@color/darkerGray" /> </shape> </item> <item android:gravity="bottom|center_horizontal" android:top="50dp"> <!--android:top="-40dp"-->

how to make imageview border with two color and fix size border width in andorid

十年热恋 提交于 2019-12-08 04:13:35
问题 I have create the circularimageview and this image view set the two colors and this color sizw are same how to set border with fix size and two borders? **I have already use library 'com.pkmmte.view:circularimageview:1.1' ** #ce90ce inner circle # ab84ab outer circle ineer circle opacity 20% outer circle opacity 15% My Image like this My Adapter Layout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout

Converting an open curve to a list of ordered pixels: a Python test code with numpy

廉价感情. 提交于 2019-12-07 22:30:46
问题 I have the image of an open curve in a numpy array and I need to build a list of points coordinates ordered according to their position on the curve. I wrote a draft script using numpy and mahotas. It may not be optimal. I know that OpenCV can do this for a closed curve. Can OpenCV do the same (faster) with an open curve? For example, if the original curve is: [[0 0 0 0 0 0 0] [0 1 0 0 1 0 0] [0 0 1 0 0 1 0] [0 0 0 1 1 0 0] [0 0 0 0 0 0 0]] Using np.where(myarray==1) , I can get the indices

How to draw line between two nodes placed in different Panes / Regions

断了今生、忘了曾经 提交于 2019-12-07 18:41:56
问题 I am tryin to draw a genealogy tree. In my tree, I store information about ex partners. So the Panel (Region) for person shoud looking like this Z * * * Z * * * Z * * * X --- Y Where Z represent exPartner, X represent Persion and Y represent current Wife / Husband And now I would like to draw line to connect current relation with children. And ec relations with children. (graphicaly there will be a line beetwen Z and *) But when the person is in the other region LayoutX and LayoutX property

Create a plane mesh, with points defining colors

柔情痞子 提交于 2019-12-07 18:26:22
问题 I've created ~2500 meshes and use an algorithm defining the color of each mesh. The algorithm goes through all meshes and adds a value depending on the distance it has to each "red-start" point. The value then decides what the color should be. This is the result: It is lagging and the corners aren't smooth. I want to recreate the same color result in some other way but can't figure out how. How can you do it with THREE.Shape and FragmentShader? Final Goal Description: Using one, for increase

Ideas for generating random lobulated pulmonary nodule contours

匆匆过客 提交于 2019-12-07 18:21:57
问题 I need to generate random lobulated contours such as the following Any ideas or algorithms on how to do this ?? The software I am going to use is matlab, however I have no problem if you post solutions in other languages too... p.s I only need to plot a random contour that resembles the above... 回答1: How about this? degree = 5; numPoints = 1000; blobWidth = 5; theta = 0:(2*pi)/(numPoints-1):2*pi; coeffs = rand(degree,1); rho = zeros(size(theta)); for i = 1:degree rho = rho + coeffs(i)*sin(i

A lightweight templateable WPF shape

谁都会走 提交于 2019-12-07 17:47:16
问题 I'm using ellipses and other shapes as onscreen markers, I would like others to be able to change these visuals using templates. However, as shape doesn't support templating I'm forced to create a basic UserControl, which defaults to show an ellipse, and then use that instead of the basic shape. Has anyone got a neater solution? I'm a little concerned if I create 1000's of these onscreen that performance/memory will be a bit of an overhead. 回答1: UserControl derives from ContentControl . It

Android - Multiple colors & size in drawable shape style

▼魔方 西西 提交于 2019-12-07 16:06:44
问题 I'm trying to have a circle background for my TextView, so I created a shape style as below. But I need to have multiple colors with multiple sizes (while the textSize stays constant), so I need to set the width/height in the style. From my understanding..Layer List puts all the shapes on top of one another? Because I need to call it 12 times at different places, so it seems quite cumbersome to have 12 shape style xmls. Is there a better way to have all the different shape/size combinations