Click here to Skip to main content
16,008,183 members
Home / Discussions / Graphics
   

Graphics

 
AnswerRe: Image Warp Function needed. Pin
Force Code20-Jun-07 6:39
Force Code20-Jun-07 6:39 
GeneralRe: Image Warp Function needed. Pin
SandipG 20-Jun-07 18:09
SandipG 20-Jun-07 18:09 
QuestionIntelligent Connectors Pin
whatitis17-Jun-07 19:12
whatitis17-Jun-07 19:12 
AnswerRe: Intelligent Connectors Pin
Tim Craig18-Jun-07 18:16
Tim Craig18-Jun-07 18:16 
GeneralRe: Intelligent Connectors Pin
whatitis18-Jun-07 18:39
whatitis18-Jun-07 18:39 
QuestionIntelligent Connectors Pin
whatitis17-Jun-07 19:12
whatitis17-Jun-07 19:12 
QuestionIDirectDrawSurface7::Blt function does not work with secondary screen [modified] Pin
raytracingx17-Jun-07 16:36
raytracingx17-Jun-07 16:36 
QuestionGDI+ How to limit number of PathPoints in GraphicsPath [modified] Pin
shipstech15-Jun-07 7:49
shipstech15-Jun-07 7:49 
My application is a scrolling histogram. With each tick of the clock I add another rectangle to the graphicspath and then use TranslateTransform() to scale and "scroll" the data.

Unfortunately this app must run 24/7 for weeks (months?!) at a time so the GraphicsPath gets very big. Does anyone know a way to remove PathPoints from a GraphicsPath? Something better than the following barebones class?

Thanks for having a look.


Public Class SizeLimitedGraphicsPath

Private Gp1 As New GraphicsPath
Private Gp2 As New GraphicsPath
Private ActivePtr As GraphicsPath
Private InActivePtr As GraphicsPath
Private NextActiveGp As Integer

Private _minimumSize As Integer


Public Sub New(ByVal MinimumSize As Integer)
_minimumSize = MinimumSize
ActivePtr = Gp1
InActivePtr = Gp2
NextActiveGp = 2
End Sub

Public Sub AddRectangle(ByVal rect As RectangleF)
Gp1.AddRectangle(rect)
Gp2.AddRectangle(rect)
SwapIfNecessary()
End Sub

Public ReadOnly Property gp() As GraphicsPath
Get
Return ActivePtr
End Get
End Property

Private Sub SwapIfNecessary()
If InActivePtr.PointCount > _MinimumSize Then
If NextActiveGp = 1 Then
ActivePtr = Gp1
InActivePtr = Gp2
Gp2.Reset()
NextActiveGp = 2
Else ' Nextgp = 2
ActivePtr = Gp2
InActivePtr = Gp1
Gp1.Reset()
NextActiveGp = 1
End If
End If
End Sub
End Class


Wfanning@gso.uri.edu



-- modified at 8:29 Monday 18th June, 2007
QuestionInner and Outer Bevel Effects. Pin
Sameerkumar Namdeo14-Jun-07 23:38
Sameerkumar Namdeo14-Jun-07 23:38 
QuestionAnti-Aliasing routine needed Pin
Force Code14-Jun-07 13:39
Force Code14-Jun-07 13:39 
AnswerRe: Anti-Aliasing routine needed Pin
Christian Graus14-Jun-07 14:09
protectorChristian Graus14-Jun-07 14:09 
GeneralRe: Anti-Aliasing routine needed Pin
Force Code14-Jun-07 14:30
Force Code14-Jun-07 14:30 
GeneralRe: Anti-Aliasing routine needed Pin
Christian Graus14-Jun-07 18:05
protectorChristian Graus14-Jun-07 18:05 
GeneralRe: Anti-Aliasing routine needed Pin
Force Code15-Jun-07 1:52
Force Code15-Jun-07 1:52 
GeneralRe: Anti-Aliasing routine needed Pin
Force Code15-Jun-07 5:17
Force Code15-Jun-07 5:17 
GeneralRe: Anti-Aliasing routine needed [modified] Pin
Force Code20-Jun-07 6:03
Force Code20-Jun-07 6:03 
QuestionWarehouse Visualization Pin
Ali BaderEddin11-Jun-07 22:13
Ali BaderEddin11-Jun-07 22:13 
AnswerRe: Warehouse Visualization Pin
Christian Graus12-Jun-07 1:50
protectorChristian Graus12-Jun-07 1:50 
GeneralRe: Warehouse Visualization Pin
Ali BaderEddin14-Jun-07 20:54
Ali BaderEddin14-Jun-07 20:54 
QuestionHow can i capture a screen shot from handled video screen ? [modified] Pin
vmguneri11-Jun-07 6:58
vmguneri11-Jun-07 6:58 
Questionhow to convert template in to web page? Pin
bigphish10-Jun-07 19:51
bigphish10-Jun-07 19:51 
AnswerRe: how to convert template in to web page? Pin
Christian Graus10-Jun-07 20:56
protectorChristian Graus10-Jun-07 20:56 
QuestionFrozen screen after activation of Win screensaver Pin
sohst9-Jun-07 0:54
sohst9-Jun-07 0:54 
QuestionRe: Frozen screen after activation of Win screensaver Pin
Mark Salsbery9-Jun-07 8:47
Mark Salsbery9-Jun-07 8:47 
AnswerRe: Frozen screen after activation of Win screensaver Pin
sohst9-Jun-07 21:40
sohst9-Jun-07 21:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.