shapes

Interesting CSS shape navigation (chevrons)

一个人想着一个人 提交于 2019-12-04 14:43:42
问题 I'm building a fairly interestingly shaped navigation for a site at the moment. The shape each menu item needs to be is illustrated below: The final nav will look like an extended version of this: I thought it would be an interesting experiment to do these shapes in CSS. The CSS and HTML for one of the arrow shapes is here: .arrowEndOn { font-size: 10px; line-height: 0%; width: 0px; border-top: 11px solid #FFFFFF; border-bottom: 11px solid #FFFFFF; border-left: 5px solid transparent; border

Having a path that follows another one

白昼怎懂夜的黑 提交于 2019-12-04 13:31:25
问题 I have an array of coordinates (geographic coordinates, but that shouldn't matter) and I need to have a path that "follows" the path that we already have. We need something like on the following image. You can see that the path is not exactly the same (not a simple offset) and we don't want it to scale either. Is there some library that we could use to do that or some pointers on how to implement this? 回答1: After spending way too much time trying to find a working solution I ended up coding

Rounded corner for textview in android

感情迁移 提交于 2019-12-04 07:39:18
问题 I have a textview and want its corner to be in round shape. I already know it can be done using android:background="@drawable/somefile" . In my case, this tag is already included so cannot use again. e.g android:background="@drawable/mydialogbox" is already there to create image in background <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_gravity="top" android:background="

How do I group a set of shapes programmatically in excel 2007 vba?

亡梦爱人 提交于 2019-12-04 06:39:55
I am iterating over data on the Electrical Tables sheet and creating shapes on a Shape sheet. Once the shapes are created I would like to programmatically group them. However I can't figure out the right syntax. The shapes are there, selected, and if I click the group button, they group perfectly. However with the following code I get Runtime Error 438 Object does not support this method or property. I am basing this code on vba examples off the web - I am not a strong vba programmer. What is the right way to do this? I am working with excel 2007 and switching excel versions isn't an option.

CSS3 label tag facing right and using position or :after

做~自己de王妃 提交于 2019-12-04 04:54:01
问题 I am trying to construct this shape in CSS: But I can't figure out how to put the triangle shape (considering I have a rectangle for the "body" of the tag and a triangle for the tip) facing right. Because I'm working with positions, how can I tell the triangle to appear right after the rectangle, when tags can all have different sizes? I just can't work it out. You can check the fiddle: http://jsfiddle.net/ExZFe/ with a similar tag to the one I'm making. This example uses just positions, so

Create random shape/contour using matplotlib

吃可爱长大的小学妹 提交于 2019-12-04 04:53:13
I am trying to generate an image of a random contour using python but I couldn't find an easy way to do it. Here is an example sort of what I want: Initially I tought of doing it using matplotlib and gaussian functions, but I could not even get close to the image I showed. Is there a simple way to do it? I appreciate any help matplotlib Path A simple way to achieve random and quite smoothed shapes is using matplotlib.path module. Using a cubic Bézier curve, most of the lines will be smoothed, and the number of sharp edges will be one of the parameters to tune. The steps would be the following.

Programmatically convert SVG shapes to paths (lineto, moveto)

半城伤御伤魂 提交于 2019-12-04 03:57:18
I have an SVG file coming from Inkscape, Illustrator, or any other application. I want to convert the shapes to lineto , moveto , curveto format. What I want is something like: ./Appname svgfile outfilewithpath I will give the SVG file as an argument, then my application will convert the object into the respective paths. Paul Sweatte Inkscape has a command-line interface. Use the Inkscape man page along with the verb source for reference: The ObjectToPath verb converts an object to a path: inkscape filename.svg --select=myobject --verb=ObjectToPath --export-plain-svg=filename_to_path.svg The

Android - Drawable repeat shape to create pattern

谁说胖子不能爱 提交于 2019-12-04 03:20:22
问题 I need to create a pattern to set as a background of some View . I want the pattern to look something like this: I don't want to import any image to drawable, but instead, I want to create my own shapes, layer-list and the ultimate goal is to have a pattern as a background. Is is possible to achieve this without having to import any external image? 回答1: You can get a pattern of repeating tiles based upon shape drawables by creating a custom View and overriding onDraw() . Let's start by

Connect two circles with a line

大憨熊 提交于 2019-12-03 18:11:45
问题 I'm drawing two shapes (circles) in a JPanel and I need to connect them with a line. I was doing this by just getting the middle point of the circle and connecting each other, easy. The problem is that now I need to make single-direction lines, which has an "arrow" at the end, to point out which direction the line goes. So now I can't use the middle point of the circle because I need to connect each other from border to border, so the "arrow' can appear correctly. On my last try that was the

How do I draw an ellipse with arbitrary orientation pixel by pixel?

旧时模样 提交于 2019-12-03 12:41:29
I have to draw an ellipse of arbitrary size and orientation pixel by pixel. It seems pretty easy to draw an ellipse whose major and minor axes align with the x and y axes, but rotating the ellipse by an arbitrary angle seems trickier. Initially I though it might work to draw the unrotated ellipse and apply a rotation matrix to each point, but it seems as though that could cause errors do to rounding, and I need rather high precision. Is my suspicion about this method correct? How could I accomplish this task more precisely? I'm programming in C++ (although that shouldn't really matter since