shapes

Drawing on Video within C#

混江龙づ霸主 提交于 2019-12-05 18:22:45
问题 I am making an application that will allow users to apply certain tools to analyse videos & images. I need help with how i actaully draw/write on the video loaded into windows media player within my form and being able to save it on. It needs to be able to lert the user draw freehand and shapes on it. Thanks in Advance, Chris :) 回答1: This is a non-trivial, if not impossible task to accomplish with the wmp control in winforms. I don't know of any way to actually draw on the wmp but you could

I am having an issue with drawing a cross with JavaFX

て烟熏妆下的殇ゞ 提交于 2019-12-05 17:43:48
I am trying to write code that will draw 3 shapes diagonally across a grid. The first two shapes are a square and a circle, which I was able to do. The third shape, however, is giving me some grief. I am supposed to draw a cross (T version, not X), and every time I write out the code it comes out looking like a sideways, ⊢. I know I am just missing something simple, but I would really appreciate the help! Here is the full code for my Shapes program. import javafx.application.Application; import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene

How to make star shape in Java?

流过昼夜 提交于 2019-12-05 09:09:57
I'm trying to make some shapes with Java. I created two rectangles with two different colors but I want to create a star shape and I can't find useful source to help me doing this. Here is my code: import java.awt.*; import javax.swing.*; public class shapes extends JPanel{ @Override public void paintComponent(Graphics GPHCS){ super.paintComponent(GPHCS); GPHCS.setColor(Color.BLUE); GPHCS.fillRect(25,25,100,30); GPHCS.setColor(Color.GRAY); GPHCS.fillRect(25,65,100,30); GPHCS.setColor(new Color(190,81,215)); GPHCS.drawString("This is my text", 25, 120); } } You could try using a polygon and

How do I include System.Windows.Shapes?

跟風遠走 提交于 2019-12-05 07:01:31
I am using Visual Studio 2008 with the .NET Framework (v3.5). I cannot seem to use System.Windows.Shapes, or anything System.Windows.* besides Forms. Here is the link to the class description: System.Windows.Shapes (MSDN Library) Is there some special thing I need to do to use it? I checked in all of the framework folders, and the only dll/xml files I have for System.Windows is System.Windows.Forms. What do I need to do to get this to work? This class is part of WPF, from MSDN : Shape Class Assembly: PresentationFramework (in presentationframework.dll) You need to add a reference to the

How to get Shape's internal name in Excel

ぃ、小莉子 提交于 2019-12-05 05:53:00
When a picture is inserted into an Excel worksheet using Shapes.AddPicture(...) method, Excel gives it a name "Picture 1", "Picture 2" etc automatically. This name can be used to get a reference to this shape object in Shapes collection like Shapes.Item("Picture 1"). If the name is changed in Excel using the Name Box, there are two different names (or one of them is a key/Caption) through which the Shape object can be referenced. So if I change the name to "MyPic" I can use any of these to reference a shape in Shapes collection: Shapes.Item("Picture 1") OR Shapes.Item("MyPic") The name can be

What is the android equivalent of java.awt.geom.Area?

放肆的年华 提交于 2019-12-05 04:29:20
I want to build complex shapes as the intersection of two circles and a rectangle. After researching a bit, java.awt.geom.Area class seems perfect for this task. I was dismayed, however, when I discovered that the awt package doesn't come with the android SDK. Does anyone know of any alternatives for android that allows me to create complex shapes by defining the union and intersection of simpler shapes? Note: Using graphics clipping to draw the shape doesn't work because I don't just want to draw the shapes, I also want to store the shapes in memory to do collision detection and other

How to print out an X using nested loops

扶醉桌前 提交于 2019-12-04 22:37:49
I have searched through to find a simple solution to this problem. I have a method called printCross(int size,char display) It accepts a size and prints an X with the char variable it receives of height and width of size. The calling method printShape(int maxSize, char display) accepts the maximum size of the shape and goes in a loop, sending multiples of 2 to the printCross method until it gets to the maximum. Here is my code but it is not giving me the desired outcome. public static void drawShape(char display, int maxSize) { int currentSize = 2; //start at 2 and increase in multiples of 2

How to show image view in Circle? [duplicate]

早过忘川 提交于 2019-12-04 22:06:35
This question already has an answer here: How to create a circular ImageView in Android? [duplicate] 1 answer I'm going on with image view to pic from gallery or take picture from camera after all process we view the image in a square by default can we change the view to circle shape by default using SDK in Android. Is there any possibility with out cropping the image only by using SDK. If anyone have idea about this please help me guys. Illegal Argument There are a lot of library and post on this topic. Here are some: CircularImageView CircleImageView Stackoverflow post 1 Stackoverflow post 2

Drawing star shapes with variable parameters

天大地大妈咪最大 提交于 2019-12-04 21:34:04
问题 I have task to write program allowing users to draw stars, which can differ in size and amount of arms. When I was dealing with basic stars I was doing it with GeneralPath and tables of points : int xPoints[] = { 55, 67, 109, 73, 83, 55, 27, 37, 1, 43 }; int yPoints[] = { 0, 36, 36, 54, 96, 72, 96, 54, 36, 36 }; Graphics2D g2d = ( Graphics2D ) g; GeneralPath star = new GeneralPath(); star.moveTo( xPoints[ 0 ], yPoints[ 0 ] ); for ( int k = 1; k < xPoints.length; k++ ) star.lineTo( xPoints[ k

EaselJS: connect 2 containers/shapes using a line

自作多情 提交于 2019-12-04 18:17:44
I want to be able to click on a container/shape and as I move the mouse a line that can be connected to another container/shape (with an arrow at one end) is drawn. Ideally I want this line to snap to the destination element. I'm new to EaselJS and I've got no clue on how to go about this. This is the closes I've come across of here, and I can't make sense out of it: Drawing a Line in a html5 canvas using EaselJS Here is a quick demo I put together The key steps are: Listen for mousedown on the initial item Create a shape to draw the connection when the mouse is pressed Listen for mousemove