Все вопросы: [drawing]

224 вопросов

2
голосов
4ответов
1123 просмотров

Cairo test if text overlaps

Using Cairo, I'm placing some text at random positions, and I need to know if they overlap some previously drawn arbitrary shapes. I could clip the path to the previous drawings, and if any clipping occurs it means that there is overlap. However, Cairo doesn't seem to have any functions to tell i...

0
голосов
1ответов
339 просмотров

Can I do a fillet curve in WPF?

My understanding of a fillet curve is that given three points where the middle point is associated with a radius, one can draw a curve from the two extreme points using a circle defined by the radius. Is there support for this in WPF or would I have to implement it myself?

0
голосов
1ответов
1367 просмотров

Nothing displayed when set a line to DashStyles.Dot

<DockPanel LastChildFill="True" Height="18"> <Image Height="18" Width="80"> <Image.Source> <DrawingImage> <DrawingImage.Drawing> <GeometryDrawing Brush="Black"> <GeometryDrawing.Geometry> ...

0
голосов
1ответов
205 просмотров

How to place rectangle in grid order?

So far, my program draws many rectangles and the locations of the rectangles are random (not nice). How can I place the rectangle in grid order so that it look appealing?

6
голосов
5ответов
987 просмотров

Any experience with a good drawing component/library

I am looking for a component/library I can use in an ASP.NET application that will allow the users to drag and drop shapes into a drawing area, connect them using lines, add text boxes etc. Pretty much the same thing you can do in packages like Visio, Samrt Draw etc Additional requirements: 1. ...

1
голосов
4ответов
611 просмотров

Need example of Flex or silverlight application that enables interactive drawing on a video

I am trying to evaluate which technology is best for my needs. I need to display a video I get from some remote device, and let a user interactively draw on it lines, polygons etc. I searched and couldn't find any existing applications with this ability (all the flash applications only displaye...

0
голосов
3ответов
2330 просмотров

Draw different shape of polygon randomly

My program draw 10 polygon triangles in random sizes (width and height). The coordinate (points) of the polygon were generated using Random generator = new Random(). Since the points of the triangle and the width and height were randomly generated, how can I control the number of sizes drawn? e.g...

0
голосов
4ответов
1655 просмотров

How to avoid overlapping polygon

I created a program to draw many polygons automatically everytimes user presses a button. The points of the polygon are generated automatically using the random function. The problem is that, since the points of the polygon were randomly generated, some of the polygon are overlap with other polyg...

2
голосов
4ответов
1312 просмотров

JPanel doesnt display the drawing

I have problem displaying drawing on JPanel. I created three class which linked to each other as the following. I was wondering why this code, doesn't display my drawing. c.add(pDraw); pDraw.add(draw); 1) MAIN public class mainPage { public static void main(String[]args){ JFrame app...

0
голосов
1ответов
4357 просмотров

Problem with actionscript 3 erasing drawing

I have a based image and some sprites on top of the basd image movieclip... Some of the sprites can be drawn by the user using graphics api in actionscript 3. I can draw things on the sprites but I can't create an eraser like brush that can remove part of the unwanted drawings. I try using Alpha...

60
голосов
7ответов
111696 просмотров

Android: How to overlay a bitmap and draw over a bitmap?

I have three questions actually: Is it better to draw an image on a bitmap or create a bitmap as resource and then draw it over a bitmap? Performance wise, which one is better? If I want to draw something transparent over a bitmap, how would I go about doing it? If I want to overlay one transpa...

0
голосов
1ответов
2686 просмотров

Writing Name Using Bezier Curves In C#

I have to make a program that uses C# Generated Graphics to make a replica of my name that I wrote in cursive. Twist is, I have to use Bezier Curves. I've already called a function to make Bezier Curves using 4 points and a gravity concept. My question to you is, What would be the easiest way to ...

1
голосов
1ответов
906 просмотров

creating a path in wpf programatically

I have a canvas with a bunch of textblocks spread over. Each Texbllock has differnt text in it. I need to wrap these textblocks with different shapes such as circle around one and ellipse around another and a decorative path around another etc. I am thinking of using a path in wpf to achieve this...

0
голосов
2ответов
2069 просмотров

convert graphic to Bitmap

I am creating a Graphics object to draw on the original image and I want save the modified image as a new image.The Image on the form as well as the drawing

1
голосов
2ответов
531 просмотров

Save Drawing as Image

How can I create a drawing on a form and then save the drawing as an image file?

0
голосов
3ответов
2554 просмотров

Save drawing in JComponent into Tiff file

How to save drawing in JComponent into tiff format? I only know how to save the whole Java file but I dont know how to save specific Jcomponent. Help me :-( EDITED: Thanks guys, now I am able to save my drawing to Jpeg. However I just wanted to save one of the component? The c.paintAll(buffere...

0
голосов
1ответов
563 просмотров

How to copy polygon using mouse click?

How to make a copy of a polygon using mouse click (e.g. when the mouse click, a menu pop up showing menu for copy). I have problem to differentiate a mouse click, to draw or to copy. I created a method where when the user pressed the mouse, the method will check if the mouse pressed inside exis...

1
голосов
1ответов
2536 просмотров

Draw border for image in listview

On a treeview after the select event, I populate a listview with images. I want to custom format these images and place a black color border around each image. private void TreeView1_Select(object sender, EventArgs e) { if (folder != null && System.IO.Directory.Exists(folder))...

0
голосов
1ответов
332 просмотров

drawing will not shown on webpage

i want draw a circle on my webpage so i have downloaded two different javascript for drawing a circle.one of js file is downloaded from http://jsdraw2d.jsfiction.com/ then i have use its function to draw circle but circle is not shown on html page i have try both internet explorer and mozilla fi...

2
голосов
4ответов
8915 просмотров

Using Swing, I want to draw a couple of points

... in an image and do some calculation on their [x y] coordinates. My first idea was to use an image as the background of a JPanel and then register the points, but I'm not sure there will be a way to mark these on the JPanel. There is also the Drawing library, which I'm unfamiliar with, but ...

0
голосов
3ответов
1295 просмотров

Detecting collision on line

How do I detect collision on line, preferably with mouse click? I don't use XNA. I use just simple WinForms. And I'm not creating a game. EDIT: I implemented solution from brone link and got really weird results. Here's small snippet. What I'm doing wrong? Pastebin link

0
голосов
1ответов
1361 просмотров

WPF How to erase a DrawingVisual with RemoveVisualChild

Using WPF I'm drawing symbols in the "fast way" (Drawing rendered on DrawingVisuals, no Shapes). So... I can successfully draw them and get hit-tested with no problem. But when trying to remove them, using RemoveVisualChild() plus RemoveLogicalChild(), there is no effect on the screen: No visual ...

2
голосов
2ответов
2001 просмотров

Transparent bitmap

I am having problem here with bitmaps..I want to remove the black background that my bitmap is having. I am creating bitmap bitmap from byte array..and then setting the bitmap in BitMapField..but the image shown has a black background.

0
голосов
4ответов
1660 просмотров

Does a Silverlight <line> need Width and Height defined?</line>

It seems that a won't be visible unless a height and width is specified. Is this true? This seems rather tedious. Couldn't the bounds of the line imply the correct width and height? &lt;Canvas Height="200" Width="200" HorizontalAlignment="Left" Background="Beige"&gt; &lt;!-- This...

2
голосов
3ответов
280 просмотров

owner drawn grid - .NET

I would like advice on whether or not I should program the following from scratch myself or use a 3rd party component. If there is a 3rd party component that fits the bill without too much baggage I'd appreciate recommendations. I would like to have a component that is a matrix of cells, like a ...

1
голосов
4ответов
1162 просмотров

Putting colors on an image in C#

I've used this piece of code to put an image in a variable. What I wanna do is draw dots on it on various places and then save the result. What I do is I open a dialog to select the file and to check if it worked, I put it in a picturebox. Using winforms offcourse. Using Visual Studio 2008 Profe...

0
голосов
4ответов
1134 просмотров

Drawing panel size

I have problem setting the size of drawing panel. I want a drawing panel with the size 0f 600,600.However I found that, the size of the drawing panel is smaller than 600,600. It seems that the frame size is 600,600 which make the drawing panel smaller. How can I set the drawing panel size 600,600...

5
голосов
2ответов
11158 просмотров

Easiest way to draw a sequence of points in WPF from code

I'd like to create a WPF app that traces the location of the mouse cursor, updating the image in the MouseMove event handler. My original thought was to create a GeometryDrawing and then add paths to that but I'm struggling with how to wire this up in code (though the Xaml for GeometryDrawings s...

2
голосов
2ответов
1806 просмотров

Custom Drawing of Alpha Images

I am trying to do custom drawing of an image(with alpha) and eventually going to apply different color tints to it. Right now I am just trying to draw it correctly. This might be simple problem but the result is the ALPHA on my image is black. Image is .png created from photoshop with correct alp...

1
голосов
3ответов
634 просмотров

DrawingImage always draws in upper left, regardless of coordinates supplied

I'm attempting to draw a set of images in an Image in WPF, potentially off from top left, but no matter what I do, either the Image, the DrawingImage or the DrawingGroup are causing the image that is closest to the top left corner to default to the top left corner of the image. Here's the code: ...