shapes

mouse Drag and Draw

Hello, I have problem with displaying all the triangles. I draw a triangle using mouse drag. Everytimes I draw a new triangle, the previous triangle disappeared. How can I make the triangles stay, so there will be many triangles on the drawing panel? ..... private class PaintSurface extends JComponent { Point startDrag, endDrag, midP...

Silverlight, custom object for shapes

Hello, I am studding Silverlight. I have an application where I create Polygons in UserControl_Loaded method. During creation stage I add MouseLeftButtonUp event handler like this: polygon.MouseLeftButtonUp += MouseButtonEventHandler_MouseLeftButtonUp; All polygons have the same handler. My goal is to use a custom object when I clic...

How can I identify unfilled ovals in a PDF document using CAM::PDF?

I need to identify unfilled ovals in a PDF file. After that, I should fill them with color and I need coordinates of ovals with page numbers. Can anybody help me how to solve this using CAM::PDF? ...

Combine multiple Ellipses

Hi 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?? Thanks in advanced ...

iphone pinch zoom

I have drawn few shapes in drawRect function of a view, these shapes color changes after some time repeatedly using setNeedsDisplay that calls the drawRect, secondly a shape name is also to be selected when tapped on it, up till now all works fine. There are three views each having more than one shapes drawn as above. All these views ar...

Line is erased when drawing shapes

Hi, I am trying to make an application for drawing shapes on screen by touching it. I can draw a line from one point to another- but it erases on each new draw. Here is my code: CGPoint location; CGContextRef context; CGPoint drawAtPoint; CGPoint lastPoint; -(void)awakeFromNib{ //[self addSubview:noteView]; } -(void)touchesMoved...

Aligning Shapes on a plan, Algoryhtm

Hello Coders ! I am developing a simple diagram tool with shapes on a plan using flex. First i was using a simple 20*20 grid. But the real cool stuff out their is auto axe magnet effect, that's how i call it at least to see why i mean by that i made a small video of balsamiq. http://screenr.com/clB http://www.balsamiq.com/ As you ca...

In PowerPoint VBA, how to nudge all the present shapes in the window (not only one)?

As far as I understand, this code "grabs" only the first shape in the active window and nudges it: Set oShape = oSlide.Shapes(1) oShape.Left = oShape.Left + 5 How can I "grab" all the shapes in the window and nudge them all at once? ...

Creating a Squircle

Hello there. I'm a first year programmer. I'm trying to create a squircle. (square with round corners). So far i have managed to get. I have been given the constants of a,b and r. If anyone could help i would be really thankful. I'm a total noob to this. So be nice :) package squircle; import java.awt.*; import javax.swing.*; import ...

Java OpenGL draw a star

Hi, I'm working on an OpenGL project in which I want to draw a star. It doesn't necessarily have to be a 3d looking star (2d looking is fine). I have the xyz coordinates for the center of the star and I know the size I'd like it to be. I don't do much OpenGL/3d math programming, so any help here would be much appreciated. EDIT: More det...

"Beveled" Shapes in Quartz 2D

I'm familiar with some of the basics of Quartz 2D drawing, like drawing basic shapes and gradients and so on, but I'm not sure how to draw a shape with a "beveled" look, like this: Essentially we've got a shine on one corner, and maybe some shading in the opposite corner. I think -- I didn't make this image, although I'd like to be ab...

Are there any easy ways to generate OpenGL code for drawing shapes from a GUI?

I have enjoyed learning to use OpenGL under the context of games programming, and I have experimented with creating small shapes. I'm wondering if there are any resources or apps that will generate code similar to the following with a simple paint-like interface. glColor3f(1.0, 0.0, 0.0); glBegin(GL_LINE_STRIP); glVertex2f(1, 0); glVert...

How to refer to shapes in Visio vba

How does one create specific shapes in microsoft visio that are selectable through the normal interface? I am looking for code like ActivePage.addShape(type: person, 100,100, 50,50) The msdn and visio help documentation comes across as a bit advanced for a beginner, but is it the case that one has to add a shape manually and then give i...

Image processing-Shape Recognition.

I want algorithm for recognizing multiple no of shapes(Specially rectangle and squares) in a picture.Preferably I am using C# so, I am looking forward for solutions in C#. ...

How to manage Mouse clicks on Irregular Button shapes in Flex

Hi, In Flex, I am trying to design 3 buttons similar to the image uploaded at http://www.freeimagehosting.net/uploads/f14d58b49e.jpg The mouse over/click on image should work only on red colored area of the button. How can I manage the Mouse clicks or Irregular Button shapes in Flex? Thnx ... Atul ...

Multiple shapes on Android

Hi Hi I'm trying to build a layout where some shapes will popup every 2 seconds. If the user will click one of these shapes, they have to disappear. What is the correct way of doing this? I thought about a thread, but i missed out. Here's my code at the moment (is not working): public void onCreate(Bundle savedInstanceState) { ...

Method for combining tiled squares defined as points into vectors

If I tile squares, and the squares can be defined by their coordinates, how can I simplify shapes made of multiple squares into vectors that define each edge of the entire shape? Pseudo-code or general terms are fine. ...

How could I make geometry advanced operations on bezier paths?

I have a library that draws regular bezier path figures (complex paths formed of a lot of bezier points), using midpoint approximation. I can draw them without problem, but I need to add support for advanced geometry operations: Nearest point of a curve, intersection, figure contains point, and more importantly, path combinations: diffe...

Excel 2003 VBA : how to paste a shape after selection

Just wondering how I can paste an object after I have selected it: sheet1.shapes("MyShape").select With Selection basically jsut wondering how to duplicate a shape object, or any object really. Eventually I am looking to use code to copy a shape object like above from Excel, and paste it into an access form automatically. Thanks! ...

PHP Get Shape Coordinates From Points

Im sure if the title is exactly what I am trying to describe so sorry if it isnt. Ok here is what i am trying to do: What i want to do is create a function that you can enter unlimited ammount of coordinates ( the blue dots) and then it will create a shape like so and then return all coordinates the shape covers. Because this is for ...