shapes

Using predefined SVG file for creating a custom JointJS shape with ports

百般思念 提交于 2019-12-02 07:37:08
I have a series of pre-created SVG symbols I want to use in JointJS. I've searched about using precreated SVGs and I found to be possible to create a complete custom elements using SVG by putting the SVG in the 'markup' property - ( https://groups.google.com/forum/#!topic/jointjs/pQvN_0lXPVk ). Below is the example of an SVG. Your help about how can I embed this definition in the markup property and add ports to it will be highly appreciated. Thanks <?xml version="1.0" standalone="no"?> <svg viewBox="0 0 1024 768" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org

Pasted Shape not seen as “Latest” Shape

假如想象 提交于 2019-12-02 05:07:08
问题 I'm in the process of automating the production of a PowerPoint report from and Excel spreadsheet. I've got the process working up until I paste a table. I'm pasting the table to PowerPoint using PPApp.CommandBars.ExecuteMso ("PasteSourceFormatting") and the table appears as a shape on my slide (the third shape). To refer to the new shape I was using Set pShape = Slide2.Shapes(Slide2.Shapes.Count) but now now when I paste, the pShape is assigned "Shape 2" (not "Shape 3"). Is there something

detecting shapes in a bitmap

不问归期 提交于 2019-12-02 03:22:35
问题 looking for a good algorithm to do the following: I have a b&w image comprised solely of polygonal shapes, which i got by scanning in a document. I would like to find all the shapes in this image, smooth the edges, and in the end get the coordinates for the smooth shapes. Any good algorithms for doing the search and smoothing to get perfect shapes in the end? 回答1: I would start with a connected component labeling in order to separate the different polygons. A simple solution for smoothing

CSS3 label tag facing right and using position or :after

喜欢而已 提交于 2019-12-02 03:12:36
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 giving the triangle a fixed position is useless. I tried with :after but got stuck too, because of the

Android - Drawable repeat shape to create pattern

风格不统一 提交于 2019-12-01 17:35:34
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? 0X0nosugar You can get a pattern of repeating tiles based upon shape drawables by creating a custom View and overriding onDraw() . Let's start by creating the tile as a layer list made of shape drawables, in this case alternating squares of black

Nested loops for creating a spiral shape pattern in c

两盒软妹~` 提交于 2019-12-01 10:39:31
I need to make a spiral pattern made of stars '*' using nested for loops. I managed to make outter lines, now I don't know how to repeat smaller swirls in the same place. What I should have: ********* * ******* * * * * * *** * * * * * * * ***** * * * ********* Any help would be greatly appreciated. After being thoroughly nerd-sniped , I came up with this: #include <stdio.h> void print_spiral(int size) { for (int y = 0; y < size; ++y) { for (int x = 0; x < size; ++x) { // reflect (x, y) to the top left quadrant as (a, b) int a = x; int b = y; if (a >= size / 2) a = size - a - 1; if (b >= size /

How do I draw various shapes in Java ? Which library should I use? [closed]

筅森魡賤 提交于 2019-12-01 09:40:44
I want to write a program which can draw any type of shape that I assign to it like Circle Square Rectangle Which library should I use , and how do I go about it in Java ? I am a python coder , thus finding it difficult to cope with Java . Sure you can do that using Swing. You may want to look into Java's Shape library for that. Alternatively you can simply override the Component's paint method as shown below. import javax.swing.*; import java.awt.*; public class ShapeTest extends JFrame{ public ShapeTest(){ setSize(400,400); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

How to Apply Storyboard as Style

谁说我不能喝 提交于 2019-12-01 06:12:15
问题 I want to apply a Storyboard to my Rectangle Fill like this: <Rectangle Name="MyRectangle" Width="100" Height="100"> <Rectangle.Fill> <SolidColorBrush x:Name="MySolidColorBrush" Color="Blue" /> </Rectangle.Fill> <Rectangle.Triggers> <EventTrigger RoutedEvent="Rectangle.MouseEnter"> <BeginStoryboard> <Storyboard> <ColorAnimation Storyboard.TargetName="MySolidColorBrush" Storyboard.TargetProperty="Color" From="Blue" To="Red" Duration="0:0:1" /> </Storyboard> </BeginStoryboard> </EventTrigger> <

How do I draw various shapes in Java ? Which library should I use? [closed]

依然范特西╮ 提交于 2019-12-01 06:06:50
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I want to write a program which can draw any type of shape that I assign to it like Circle Square Rectangle Which library should I use , and how do I go about it in Java ? I am a python coder , thus finding it difficult to cope with Java . 回答1: Sure you can do that using Swing. You may want to look into Java's

Combine multiple Ellipses

…衆ロ難τιáo~ 提交于 2019-12-01 01:15:15
I need a way to combine multiple EllipseGeometry to make a union between them, but CombineGeometry class only can combine 2 Geometries. The ideal way is to have a class similar CombineGeometry that accepts more than Geometry1 and Geometry2 shapes. Anyone knows an object that makes such a behaviour? Arsen Mkrtchyan EllipseGeometry is a Geometry too so you can combine like this: <CombinedGeometry GeometryCombineMode="Union"> <CombinedGeometry.Geometry1> <EllipseGeometry RadiusX="70" RadiusY="30" Center="100,150" /> </CombinedGeometry.Geometry1> <CombinedGeometry.Geometry2> <EllipseGeometry