shape

Drawing background shape with one corner and two cutting edges - Android

ⅰ亾dé卋堺 提交于 2019-12-05 07:08:49
问题 I want to draw a shape to set it as background. the shape has one corner and two cutting edges. Here is the rough diagram of the shape I want with one round corner and two corners joined with straight line. I am using and to draw it. Could you help on this ? 回答1: A 9-patch bitmap (as per UDI's answer) is probably the easiest, but if you want to do it in code, create a custom Shape: import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android

Curved sail shape using HTML and CSS only?

梦想的初衷 提交于 2019-12-05 05:09:51
Is it possible to create the curved sail shape below using HTML and CSS only? I can see from this answer that I could create a straight-sided sail using: #triangle { width: 0; height: 0; border-right: 50px solid transparent; border-bottom: 100px solid red; } which looks like: or I can get a bit closer with border radius: #sail { background: #ff0000; width: 50px; height: 100px; border-top-right-radius: 50px 100px; -moz-border-radius-topright: 50px 100px; -webkit-border-top-right-radius: 50px 100px; -khtml-border-radius-topright: 50px 100px; } which looks like this: but isn't quite as elegant as

How to read Shape's properties in Visio

☆樱花仙子☆ 提交于 2019-12-05 04:24:20
I have the following task. I'm writing an Add-In for Visio 2010 on C# in Studio 2010. Let's say that I have a diagram opened. And I have a shape of any kind in this diagram (let's try to manage one shape for the begining). The question is how can I read any properties of this shape? Which API should I use? Basic algorithm: Scan opened document for shapes If there are any shapes in document, then return an array (or a list) of all shapes (null is returned in case of no shapes in current document) Run over shapes array and read any property for each element (that would be great to have a chance

Get data frame with polygons id and Centroid (lat long) information from shapefile

怎甘沉沦 提交于 2019-12-05 04:20:31
I have a polygon shapefile (downloadable here ) from which I want to create a data.frame with 3 columns containing: Polygon id Centroid latitude Centroid Longitude From this answer here , I know it its quite easy to get this information as a Formal Class SpatialPoints object. And when I convert this object to a data.frame I loose the id information. # Load Shapefile Legislative_areas <- readOGR(dsn = 'C:/Users/.../Downloads/Legislative2010UTM', layer ='Legislative2010UTM') # Get centroids cent <- gCentroid(Legislative_areas, byid=TRUE) # Convert to data.frame, but loose id info cent <- as.data

Creating custom shapes from primitives

吃可爱长大的小学妹 提交于 2019-12-05 02:58:10
问题 I'm trying to create a custom Physics shape with combining primitive shapes. The goal is to create a rounded cube. The appropriate method seems to be init(shapes:transforms:) which I found here https://developer.apple.com/library/prerelease/ios/documentation/SceneKit/Reference/SCNPhysicsShape_Class/index.html#//apple_ref/occ/clm/SCNPhysicsShape/shapeWithShapes:transforms: I'm thinking this could be done with 8 spheres, 12 cylinders and a box in the middle. Can anyone provide an example of

GoJS组织结构图2

↘锁芯ラ 提交于 2019-12-05 02:34:45
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Org Chart Editor</title> <meta name="description" content="组织结构图编辑器-编辑详细信息并更改关系。" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <script src="https://unpkg.com/gojs/release/go-debug.js"></script> <link rel="stylesheet" href="../extensions/dataInspector.css" /> <script id="code"> // 初始化JSON格式的数据 var modelObj = { "class": "go.TreeModel", "nodeDataArray": [{ "key": 1, "name": "Stella Payne Diaz" }, { "key": 2, "name": "Luke Warm", "parent": 1 }, { "key": 3, "name": "Meg Meehan Hoffa", "parent": 2 }, { "key": 4,

creating gradient stroke using layer-list

左心房为你撑大大i 提交于 2019-12-05 01:40:35
问题 I am trying to use layer-list to create a gradient stroke (i.e. perimeter/border) as the background of my view. But it's not working. Here is my code <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item> <shape android:shape="rectangle" > <gradient android:angle="270" android:centerColor="#FFFFFFFF" android:endColor="#FFCCCCCC" android:startColor="#FFCCCCCC" android:type="linear" /> </shape> </item> <item> <shape android:shape=

Custom Shape in Silverlight (porting app from WPF)

五迷三道 提交于 2019-12-05 00:43:59
I'm converting a WPF app to Silverlight. The app includes a class which inherits from Shape. It overrides the DefiningGeometry property to return a Path object. However, the Silverlight Shape class doesn't have a DefiningGeometry property. Reading on the internet I've found others with this same problem. The solution seems to involve inheriting from Control directly, and setting the Content property to the path. However, I also want to retain my event handlers (MouseEnter, MouseLeave, GotFocus, LostFocus) plus I would like it to keep it's position and resize proportionally to the rest of the

Diagonal Wedge Shaped CSS - Edge to Edge Centered in Browser

 ̄綄美尐妖づ 提交于 2019-12-05 00:16:24
I have been trying to make this shape in CSS. Ideally it will span the entire length of the browser window and probably extend outside the field of view to support larger screens and also be centered so that the angle does not change. Anyone have any solutions? Also I think I might run into a problem of the angle aliasing harshly. I might need to resort to using an image. Would like to use CSS though. ** Image Spelling Error. (Indefinitely not Inevitably) A solution that doesn't require CSS3 support: jsfiddle demo HTML <div class="shape"> <div class="top"></div> <div class="bottom"></div> <

Text with shapes in drawable resource

余生长醉 提交于 2019-12-05 00:04:11
Can i create text-shape in drawable resource? I was googling much but found nothing... Here is my drawable file: <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="oval"> <stroke android:width="3dp" android:color="#QQffQQ"/> <size android:width="120dp" android:height="120dp"/> </shape> </item> <item android:right="59dp" android:left="59dp"> <shape android:shape="rectangle"> <solid android:color="£22££20"/> </shape> </item> <item android:top="59dp" android:bottom="59dp"> <shape android:shape="rectangle">