Use Graphics Path Iterator to get the Path information : Graphics Path Iterator « 2D « VB.Net

VB.Net
1. 2D
2. Application
3. Class
4. Data Structure
5. Database ADO.net
6. Development
7. Event
8. File Directory
9. Generics
10. GUI
11. Language Basics
12. Network Remote
13. Thread
14. Windows System
15. XML
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net Tutorial
VB.Net » 2D » Graphics Path IteratorScreenshots 
Use Graphics Path Iterator to get the Path information
Use Graphics Path Iterator to get the Path information

Imports System
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Text
Imports System.Drawing.Imaging

Public Class MainClass

  Shared Sub Main()
    Dim As GraphicsPath = New GraphicsPath()
    Dim pts() As PointF = {New PointF(50.0F50.0F), _
                       New PointF(150.0F25.0F), _
                       New PointF(200.0F50.0F)}
    p.AddCurve(pts)
    p.AddRectangle(New Rectangle(60605050))
    p.AddPie(1001008080035)

    Dim iter As GraphicsPathIterator = New GraphicsPathIterator(p)
    Console.WriteLine("Num pts in path = " & iter.Count.ToString())
    Console.WriteLine("Num subpaths in path = " & iter.SubpathCount.ToString())
    Console.WriteLine("Path has curve = " + iter.HasCurve().ToString())

    Dim StartIndex As Int32
    Dim EndIndex As Int32
    Dim As Int32
    Dim IsClosed As Boolean
    ' Rewind the Iterator.
    iter.Rewind()
    ' List the Subpaths.
    For i = To iter.SubpathCount - 1
      iter.NextSubpath(StartIndex, EndIndex, IsClosed)
      Console.WriteLine("Start: " + StartIndex.ToString() + _
                         "  End: " + EndIndex.ToString() + _
                         "  IsClosed: " + IsClosed.ToString())
    Next
  End Sub
  
End Class



           
       
Related examples in the same category
w__w___w__.___j___a___va___2__s__.__co_m_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.