how to draw lines with arrowheads at end - flex3

how to draw lines with arrowheads at end
i want to draw connector/line between two shapes with arrow head at end
Any help appreciated

Chris Huyler' blog has a post about drawing lines and arrows with Flex, using the GraphicsUtil library by Noel of DoesNotCompute.

Related

Coreldraw Multiple Contours in VBA

Guys I Am trying to set up a three colour text that is editable
Basically what I want is the text to be black
A 1st contour of 1mm that is white
a 2nd contour of 2mm thick which is black
I have tried the following 2 step contour
ActiveSelection.CreateContour cdrContourOutside, 2, 2, , , CreateRGBColor(0, 0, 0), CreateRGBColor(255, 255, 255)
this works perfectly as I want and when I edit the text the contour changes to the new text however the contours are both the same width (2mm) and not 1 & 2mm as i want
Also I cant get it to specify the correct color for each contour
If I break apart the 1st contour then add another this gives me contours of different widths and colors but I then loose the edit ability as the contour is not attached to the text
Any Ideas I Know its possible as I have seen a commercial macro that does it
Any Help appreciated
Mark
The best I can do for you is to show you the object model. I do not have CorelDraw and therefore cannot test anything.
Here is the link to the CorelDraw Object Model.
http://apps.corel.com/partners_developers/csp/resources/CorelDRAW%20VBA%20Object%20Model.pdf
And here is a link to a Programming Guide for CorelDraw.
http://apps.corel.com/partners_developers/csp/resources/dvba_pg.pdf
You can look up "Applying Effects" on page 72 of the programming guide which may help.
I would suggest also looking at creating curves from the .Shapes object and then looking at the TextRange object. the TextRange.Text property is the actual text you want to see and the TextRange.colorindex is the color of the text I believe. You will have to do some exploring, but this should help.

Convert colored line in Bitmap image to System.Drawing.Graphics

is there any way to convert a colored lines in a picture (say Path Lines in Google Earth, colored red ) into lines of Drawable objects (System.Drawing.Graphics)? If there is no direct way, please point me to the right directions on how to do this?
Basically I want to convert those 3 red lines in the image into 3 red line objects in VB.NET through code. Thanks.

How to cut out numbers from an image dynamically?

i've got to this stage:
where i can find the numbers in the above image but i need to cut them out so i can retain the order etc. but the as the number increases the spacing changes and the position of the number?
so i think it should be a find a white PX the continue until it find a solid black col and then use the points to do a simple cut any help would be great.
A simple solution would be this:
Find the first upmost horizontal line which contains white pixels
From that line find the first horizontal line which contains only black pixels
Those two lines are your upper and lower borders.
Between this borders proceed like this:
Find the first most left vertical line which contains white pixels
From that line find the last vertical line which contains only black pixels and which comes directly after a line with white pixels.
Those two lines are your left and right borders.
The steps to separate single numbers can be performed analogously.
If you need to identify which numbers are in your picture, I recommend using specialized computer vision libraries.
Some VB.net pseudo code to get you going:
Sub FindTopBorder(image As MyImage) As Integer
For y = 0 to image.Height - 1
For x = 0 to image.Width - 1
Dim pixel = image.GetPixel(x, y)
If ('Check if pixel is white here with RGB or Color') Then
Return y
End If
Next
Next
' Just in case there are no white pixels or use an exception instead
Return -1
End Sub
I would start looking into Connected component segmentation. You find a pixel which is within a character (number). Then run the connected component algorithm which finds all connected pixels under specific set of rules (e.g. slight deviation in color, stop at hard borders etc).
http://en.wikipedia.org/wiki/Connected-component_labeling
If you can use libraries, I'm sure OpenCV or similar libraries support this out of the box.
//edit
I see you need VB.net. Probably it is easiest to port some algorithm to VB or create one yourself.
See e.g. http://www.codeproject.com/Articles/336915/Connected-Component-Labeling-Algorithm
What to expect
Input
An image containing two shapes:
Output
Now each is separated into single images.

How can I combine lines and brush at the same time?

I have been using this d3 example http://bl.ocks.org/mbostock/1667367 But my question is if I add lines in the extremes of the brush where each point match the points on the focus area? I think it looks like a "torch" I add a picture http://i.stack.imgur.com/KgZUr.jpg
Regards.

VB.NET: Mark Points in Line Chart

I'm creating a Chart with Lines on it in VB.NET. Now I got multiple Values in one Line. I want to mark certain of these values with a little Circle (or a Sqare, nevermind).
How do I have to do this?
It should look right light this:
How to Achieve?
Setting the Point's Marker does the Trick:
dataGridView1.Series(0).Points(0).MarkerStyle = DataVisualization.Charting.MarkerStyle.Circle
dataGridView1.Series(0).Points(0).MarkerSize = 10