Interface And Graphics :: Drawing Dotted Path Lines, With Even Dots Along The Path Line?

Apr 13, 2012

Problem drawing dotted path lines, with even dots along the path line.I want to draw a path line that can be any shape (square, round, outline etc), and along this path line I want even dots to appear.

I also want to be able to resize the shape (as in the example attached)This is very easy to do using "DrawPath" and defining points for the path and using a pen defined as dots.The problem I have is I want the dots to be evenly placed along the path, on any shape or size I draw.In the example I have created, I create a square with 4 points and draw a dotted path.There are 2 buttons that allows me to resize the square (larger or smaller) this helps show the problem more clearly.

The path starts at the top left corner and finishes back at the top left corner, the dots are evenly placed along the path, except the final dots at the end of the path. (Sometimes the dots are even and other times they are not even).The shapes I want to draw can be any size and any shape, but I have used a square in this example to show the problem I have. point me in the direction I need to go that allows me to draw the dots and give the impression that they are even all along the path, for all shapes and sizes.

In the pictures below if you change the size of the shape, one will have even looking dots, the other will not.

[Code]...

View 2 Replies


ADVERTISEMENT

Drawing Dotted Path Lines, With Even Dots Along The Path

Apr 12, 2012

I want to draw a path line that can be any shape (square, round, outline etc), and along this path line I want even dots to appear. I also want to be able to resize the shape (as in the example attached) This is very easy to do using "DrawPath" and defining points for the path and using a pen defined as dots. The problem I have is I want the dots to be evenly placed along the path, on any shape or size I draw.

In the example I have created, I create a square with 4 points and draw a dotted path. There are 2 buttons that allows me to resize the square (larger or smaller) this helps show the problem more clearly. The path starts at the top left corner and finishes back at the top left corner, the dots are evenly placed along the path, except the final dots at the end of the path. (Sometimes the dots are even and other times they are not even).

The shapes I want to draw can be any size and any shape, but I have used a square in this example to show the problem I have. I need to to draw the dots and give the impression that they are even all along the path, for all shapes and sizes. [Code]

View 2 Replies

Drawing Dotted Path Lines With Evenly Spaced Dots?

Apr 22, 2012

I have a problem drawing dotted path lines, with evenly spaced dots: I want to be able to draw evenly spaced dots along a path line using points in an array, My issue is not with drawing the path line, with dotted lines, this is easy, but with the spacing of the dots at the start and end of the path line.

In the example I have created, I create a square with 4 points and draw a dotted path.The path starts at the top left corner and finishes back at the top left corner, the dots are evenly placed along the path, except the final dots at the end of the path. (Sometimes the dots are even and other times they are not even).The shapes I want to draw can be any size and any shape, but I have used a square in this example to show the problem I have.I have also attached two pictures showing the dotted path line, 1 with even spaced dots at the start / End and another showing the problem I want to resolve, with not evenly spaced dots at the start / end.The only difference between the two is the point values.

View 1 Replies

Interface And Graphics :: Drawing Line Chart With Dynamic Data

Apr 13, 2009

I would like to build a line chart which can redraw or change during a period of time with dynamic data. So that the x, y axis will change if out of range. The graph may be somehow similar to Matlab. I am using vs2005.

View 2 Replies

Interface And Graphics/whats The Difference Between Drawline And Draw Path

Oct 13, 2008

Is there any way to have 2d graphics that gets made by user through manual dimensions input be bound to a text box?

Is there any way to take position 1000,600 and make that zero? Can we make graphics by inputting only the next co-ordinate and have the pc automatically draw a line from last point?

Also, whats the difference between drawline and draw path? How can I get the shape to remain on screen when I toggle between pages?

View 9 Replies

Interface And Graphics :: Fuzzy Gradient Lines And Line Smearing

Apr 8, 2012

I look at hundreds of VB.Net user interfaces through the internet and they all look horribly unsophisticated from a graphics point-of-view.Compare this to the backgrounds seen on tv broadcast that use blurred line gradients to create graphics that have some interesting appeal and draw the eye to them (at least my eye).I've attached some sample screenshot grabs below that I have annotated with magenta rects showing the interesting sections.What types of graphics routines can produce these types of graphic effects? The options that I have identified so far:

1.) More carefully done line smearing (see below..)

2.) Line drawing with a VB.Net version of the "Bresenham's line drawing algorithm"(as passel mentions in this post) (that might allow a specialized set anti-aliasing routines - like a wu algorithm).

3.) Line drawing with some Gaussian blurring as seen in the attachment to this post from my Perlin Noise thread.

4.) Possibly a gradient shaped by a vector GraphicsPath?

5.) Some other VB.Net gradient generating method?Possible the use of multiple passes with an alphafade brush?

6.) Last resort: manipulating the colors of individual pixels with lockbits marshal copying (highly undesirable).

I've done a fairly complete survey of whats out there on the internet for VB.Net samples for drawing lines to see if any of them combined line drawing with gradient effects and found very little.I played around with some code I found that did line drawing through mouse dragging and managed to achieve what I call the "line smearing" effect.I've attached my Line_Smearing_Demo below..As yet I have been unable to combine lines with shaped bezier curves,to produce Guilloche/Lissajous/complex Spirograph patterns like those seen on this page.

View 19 Replies

Interface And Graphics - Plot Points And Joint The Dots

Dec 12, 2011

Picture 1 shows an application that I am currently writing that uses the LineShape and OvalShape out of the Visual Basic Power Packs. As I change the index in the part number combo box the A, B & C dimension change to suit the dimension in the text boxes.

Problem is the limited shapes are fine to draw a router template guide, but they are somewhat limited when it comes to drawing more complex shapes like the router bits that make the shapes in Picture 2. Is there a graphic class that would allow me to plot points and joint the dots like you get in kids colouring in books? Or something a little more adept to complex shapes like curves?

I just spotted something called the Pen Class that I might need to look more into, but not knowing the first thing about graphics. Spotted some advice passel gave in another thread to search vb.net gdi+ tutorial and it looks like the Pen Class might have potential, although I am going to have to revisit some math by the looks of things.

View 19 Replies

Interface And Graphics :: System.Drawing.Graphics.DrawString On Other Window?

Aug 14, 2009

drawing text on a window which is not the current form's window.I remember doing this in Win32 api with getwindowdc(handle) to obtain a DC for the Window, then textout() on the DC.

View 2 Replies

Path Of .zip file Has Spaces In It / It's Not Recognizing Path As Valid Path

Aug 22, 2006

I have a Access program and I'm using VBA code in the background to run Winunzip using shell command. Well, the path of the .zip file has spaces in it and it's not recongizing the path as a valid path. Is there a another way to tackle this problem besides the shell?I can't us pkzip either. Has you can see I had to use progra~1 instead of Program Files.[code]

View 2 Replies

Interface And Graphics :: DoubleBuffered And External Drawing?

Dec 18, 2011

I am drawing a bunch of shapes on a form and I want to relegate some of these to a subroutine other than Form1_Paint().The form has the DoubleBuffered property set to TRUE.All the shapes that are drawn by an external sub get overwritten:Code:

[Code]...

View 3 Replies

Interface And Graphics :: Drawing A Point On A Particular Picbox

Feb 2, 2012

I have several picture boxes on a form (frmMain).My question is, how do I paint a point on a particular picture box at the location specified by the coordinates of the current mouse position? The snippet below shows defining some canvases and pens. But I'm not sure how to capture the mouse position when the mouse is over a particular picture box and how to paint the actual point at that location.[code]

View 3 Replies

Interface And Graphics :: Performance Invalidating & Drawing A Lot

Jan 18, 2011

IGraphics and drawing and invalidating thing.I have improved, that I can tell. I won't explain everything, so here's the essential:Technically, my application will let you draw a rectangle on the form. You click, drag, and boom, a red rectangle is there. This rectangle will disappear when you start drawing another.I got that working.But my problem is performance. You see, obviously I have to update, invalidate and paint my rectangle every time the mouse moves while it is in "drawing mode". I do that every time the mouse's position changes.And that is quite a big deal. Every time the mouse's position changes? That's a lot of invalidations and redraws for a decently-sized rectangle!I thought of skipping some mouse movement, like only update every 5 coordinates moved or something. But that would render my goal quite inaccurate.I already invalidate only the regions necessary, that I can tell.

View 5 Replies

Interface And Graphics :: Reinventing (and Drawing) The ComboBox?

Jul 25, 2009

I'm trying to make a custom combobox from scratch that multiple instances will share the listbox that holds the data on. I'm trying to draw the button face manually using GraphicsPaths and pens and brushes, but I'm having a few issues with it:

1. How do you draw that down arrow glyph in a way that doesn't look like a two-year-old sneezed on it? I'm having problems with the shape looking like the traditional one.

2. How do you position the listbox that contains the data in such a way that isn't bound by the containing form's render window?

3. I've tried to make the background look different when it has focus, but the OnPaint seems to think it always has focus and always makes the background the "focused control" background.

View 2 Replies

Interface And Graphics :: Rubberband Drawing Using Controls?

Jul 17, 2008

Im using VB 2005 express edition. Im trying to draw rubber band lines and rectangles using controls like buttons in one form. My problem is, i did the rubberband lines and rectangles on diff forms.Here's the snippet code for rubberband rectangle:

Code:
Private Sub MyDrawReversibleRectangle(ByVal p1 As Point, ByVal p2 As Point, ByVal dashed As Boolean)

[code].....

View 14 Replies

Drawing A GDI+ Path In Several Locations?

May 4, 2011

After a path is defined with all its components, is there a version of the DrawPath that allows the composite object to be drawn in locations other than the initial locationsFor example, the code shown below displays an ellipse and two rectangles in a specificocation. To also display the same objects in one or more other location,s, is it possible to disply the defined path at other locations or is it necessary

View 2 Replies

Interface And Graphics :: Drawing / Painting Imgs To Background.

Feb 9, 2009

Well im just upgrading from VB6 and i was able to paint images to the background of a form. The same method does not seem to work in VB 2008. Is there a way i can draw/paint images to the background of my form?

View 7 Replies

Interface And Graphics :: Drawing A Rectangle Or A Point On A Form?

Jun 8, 2010

I'm just getting started, and it's as simple as that: I need guidance to draw a rectangle or place a dot or a point on Form1, in VB 2008 Express. I knew how in VB6 -- let's build on that.

View 3 Replies

Interface And Graphics :: Drawing Equilateral Triangle In Circle?

Jan 14, 2012

I am drawing a circle, of let's say 300 pixels diameter. I want to draw a triangle, with the top of it being at New Point(diameter / 2, 0). How could I get the other 2 points of the triangle? If possible, how could i get the 3 points of a triangle rotated by x degrees?

View 1 Replies

Interface And Graphics :: VB2010: Picturebox Drawing Disappears?

May 26, 2012

Problem1: I have a picturebox on a form. I have also managed to draw several PNG files with transparency onto the picturebox (see below). However, If I move the form outside the border and move it back, the image is gone. My source so far:

Dim k1 As New Bitmap(My.Resources.image1)
Dim k2 As New Bitmap(My.Resources.image2)
Dim drawMe As Graphics = PictureBox1.CreateGraphics
Dim bgcolor As Color = Color.FromArgb(128, 128, 128)
drawMe.Clear(bgcolor)

[Code]...

View 10 Replies

Interface And Graphics :: Drawing Dynamic Connection Between Two Listview Controls?

Jul 4, 2010

I am need to drag drop listboxes with connection line in vb.net. If the listbox move then connection line should also move. I have attached picture as wel

View 1 Replies

Interface And Graphics :: Drawing Text With Custom Font And Color

Jan 8, 2009

I created an application in VS2005 that draws text with a custom font and color. The images look great from my XP machine. But from another machine running Windows Vista, the graphics are messed up. It seems that the transparencies inherit the default black background so there's this gray'ish/black haze around the text...

View 1 Replies

Interface And Graphics :: Preventing Erasing Of Drawing When Window Is Painted

Jan 7, 2009

I'm having a problem with the graphics portion of vb.net. As a school assignment, we are making "turtle graphics" applications. I have mine working perfectly, the problem that we are having (not even the teacher can fix it) is that when the window gets sent the command to be painted (ie minimized and maximized) the drawings in the picturebox I am using are completely erased. I am looking for a way to prevent this from happening. I have been trying to store the image as a bitmap in memory, which does not work. Is there another way to draw to a bitmap/image in memory and then output that to a picturebox?

View 2 Replies

Interface And Graphics :: Drawing Objects To Picturebox With Floating Point Numbers?

Jul 17, 2009

If I try to draw a circle by using e.g.

Code:
e.Graphics.DrawEllipse(Pens.Red, 50.133, 100.321, 0.1, 0.1)

I will get an error message. I tried something like

Code:
Public ObjectPoint As PointF
Dim cpoint As New PointF()
cpoint.ObjectPoint = New PointF(startX, startY)
e.Graphics.DrawEllipse(Pens.Blue, cpoint.ObjectPoint, 0.4, 0.4)

but it didn't work for the location and the circle size. How to draw a circle(and rectangle) by using floating point numbers?

View 6 Replies

List All The Points In Graphics Path?

May 17, 2010

how to list all the points in my graphics path and measure the distance between them, preferably in inches but pixels will suffice for now.

View 4 Replies

Error Using Path Class To Create Graphics?

May 3, 2011

I get an error when I use the following code to create a path as described in the Mastering Visual Basic 2008 textbook. I am entering in in vb2010

Dim
MyPath As
New

[Code].....

View 4 Replies

Draw Vertical Text To A Graphics Path In Down-up Direction?

Oct 8, 2009

I have an application that makes a drawing with measurements both horisontal and vertical. I like to get the vertical measurements to be in direction down-up, not up-down direction as StringFormatFlags.DirectionVertical does. All the measuretexts are drawn to a graphics path. Because that path includes all measures at different locations I canīt TransformRotate that path, the text should be rotated before it is passed to the graphics path, or ? It would be so nice if it would be a StringFormatFlags.DirectionVerticalUp to handle it.

View 7 Replies

Make The Media Path To The Video Path Stay Consistent No Matter Where Go?

Dec 7, 2010

i used the following codes:

private mediapath as string = "C:movie.avi"
private form1_loads blah blah blah

[code].....

View 7 Replies

Create A Function To Convert A Mapped Drive Path To A UNC Path?

Apr 7, 2009

I am trying to create a function to convert a mapped drive path to a UNC path. I did some googling and found several different pages on the matter. I am most interested in the first one, but I cannot seem to get the code to cooperate. Since the original post was in C#, here is my VB.NET conversion:

[Code]...

View 1 Replies

Forms - Zoom, Resize A Bitmap On Graphics Path And Save?

Jun 23, 2011

I am working on watermarking image.

In the below code I load the image to the graphics path using resource image and adding text on it. When I add the image through open file dialog it paints on the form with original size but I need to resize it, add it to the PictureBox, add text to it and give zoom and pan options to it and then I need to save with the original size.

When I resize and when save the image I endi up with a small image.

Here is my code:

Imports System.Collections.ObjectModel
Imports System.Drawing.Drawing2D
Public Class Form1

[Code]....

View 1 Replies

Access A File Using Relative Path Or Virtual Path?

May 22, 2012

I am trying to read and display a file using MapPath as follows :

Response.ContentType = "Application/pdf"
Dim FilePath As String = MapPath("../Document/123.pdf")
Response.WriteFile(FilePath)
Response.End()

This procedure will work fine and display in the browser. However, if I save the file to C:Document123.pdf, how can I access this file using relative path in MapPath function. Is there an option to access the file which is saved out of IIS server? I am using vb.net 2003.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved