diff --git a/Classes/cGoogleTranslate.cls b/Classes/cGoogleTranslate.cls index fa0de7b87c..63fd07b05e 100644 --- a/Classes/cGoogleTranslate.cls +++ b/Classes/cGoogleTranslate.cls @@ -18,7 +18,7 @@ Attribute VB_Exposed = False '*************************************************************************** 'Google Translate Interface -'Copyright 2013-2017 by Frank Donckers +'Copyright 2013-2018 by Frank Donckers 'Created: 19/February/13 'Last updated: 12/December/17 'Last update: harden against IE initialization errors diff --git a/Classes/pd2DBrush.cls b/Classes/pd2DBrush.cls index af57014a99..f9981c5785 100644 --- a/Classes/pd2DBrush.cls +++ b/Classes/pd2DBrush.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Graphics Fill ("Brush" in GDI/GDI+ parlance) Class -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 30/June/15 (but assembled from many bits written earlier) 'Last updated: 13/May/16 'Last update: total overhaul diff --git a/Classes/pd2DGradient.cls b/Classes/pd2DGradient.cls index 773a5c0487..ffb49672d7 100644 --- a/Classes/pd2DGradient.cls +++ b/Classes/pd2DGradient.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Gradient Manager -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 23/July/15 'Last updated: 08/October/17 'Last update: rework the way gradient nodes are serialized to XML, to improve performance diff --git a/Classes/pd2DPainter.cls b/Classes/pd2DPainter.cls index ed97a55dfa..1b59748665 100644 --- a/Classes/pd2DPainter.cls +++ b/Classes/pd2DPainter.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon 2D Painting class (interface for using pd2dBrush and pd2dPen on pd2dSurface objects) -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 01/September/12 'Last updated: 28/June/16 'Last update: implement additional surface-to-surface rendering functions @@ -171,7 +171,7 @@ Public Function DrawEllipseF_AbsoluteCoords(ByRef dstSurface As pd2DSurface, ByR DrawEllipseF_AbsoluteCoords = Me.DrawEllipseF(dstSurface, srcPen, ellipseLeft, ellipseTop, ellipseRight - ellipseLeft, ellipseBottom - ellipseTop) End Function -Friend Function DrawEllipseF_FromRectF(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DPen, ByRef srcRect As RECTF) As Boolean +Friend Function DrawEllipseF_FromRectF(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DPen, ByRef srcRect As RectF) As Boolean DrawEllipseF_FromRectF = Me.DrawEllipseF(dstSurface, srcPen, srcRect.Left, srcRect.Top, srcRect.Width, srcRect.Height) End Function @@ -188,7 +188,7 @@ Public Function DrawEllipseI_AbsoluteCoords(ByRef dstSurface As pd2DSurface, ByR DrawEllipseI_AbsoluteCoords = Me.DrawEllipseI(dstSurface, srcPen, ellipseLeft, ellipseTop, ellipseRight - ellipseLeft, ellipseBottom - ellipseTop) End Function -Friend Function DrawEllipseI_FromRectL(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DPen, ByRef srcRect As RECTL) As Boolean +Friend Function DrawEllipseI_FromRectL(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DPen, ByRef srcRect As RectL) As Boolean DrawEllipseI_FromRectL = Me.DrawEllipseI(dstSurface, srcPen, srcRect.Left, srcRect.Top, srcRect.Right - srcRect.Left, srcRect.Bottom - srcRect.Top) End Function @@ -321,8 +321,8 @@ Public Function DrawSurfaceRotatedF(ByRef dstSurface As pd2DSurface, ByVal dstCe 'Translate the corner points of the image to match. (Note that the order of points is important; GDI+ requires points ' in top-left, top-right, bottom-left order, with the fourth point being optional.) - Dim imgCorners() As POINTFLOAT - ReDim imgCorners(0 To 3) As POINTFLOAT + Dim imgCorners() As PointFloat + ReDim imgCorners(0 To 3) As PointFloat imgCorners(0).x = srcX imgCorners(0).y = srcY imgCorners(1).x = srcX + srcWidth @@ -341,8 +341,8 @@ Public Function DrawSurfaceTransformedF(ByRef dstSurface As pd2DSurface, ByRef s 'Translate the corner points of the image to match. (Note that the order of points is important; GDI+ requires points ' in top-left, top-right, bottom-left order, with the fourth point being optional.) - Dim imgCorners() As POINTFLOAT - ReDim imgCorners(0 To 3) As POINTFLOAT + Dim imgCorners() As PointFloat + ReDim imgCorners(0 To 3) As PointFloat imgCorners(0).x = srcX imgCorners(0).y = srcY imgCorners(1).x = srcX + srcWidth @@ -367,7 +367,7 @@ Public Function DrawLineF(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DP End If End Function -Friend Function DrawLineF_FromPtF(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DPen, ByRef srcPoint1 As POINTFLOAT, ByRef srcPoint2 As POINTFLOAT) As Boolean +Friend Function DrawLineF_FromPtF(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DPen, ByRef srcPoint1 As PointFloat, ByRef srcPoint2 As PointFloat) As Boolean If VerifyDrawBackends(dstSurface, srcPen) Then Select Case dstSurface.GetSurfaceBackend Case P2_DefaultBackend, P2_GDIPlusBackend @@ -398,7 +398,7 @@ Public Function DrawLineI(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DP End If End Function -Friend Function DrawLineI_FromPtL(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DPen, ByRef srcPoint1 As POINTLONG, ByRef srcPoint2 As POINTLONG) As Boolean +Friend Function DrawLineI_FromPtL(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DPen, ByRef srcPoint1 As PointLong, ByRef srcPoint2 As PointLong) As Boolean If VerifyDrawBackends(dstSurface, srcPen) Then Select Case dstSurface.GetSurfaceBackend Case P2_DefaultBackend, P2_GDIPlusBackend @@ -481,7 +481,7 @@ Public Function DrawRectangleF_AbsoluteCoords(ByRef dstSurface As pd2DSurface, B DrawRectangleF_AbsoluteCoords = Me.DrawRectangleF(dstSurface, srcPen, rectLeft, rectTop, rectRight - rectLeft, rectBottom - rectTop) End Function -Friend Function DrawRectangleF_FromRectF(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DPen, ByRef srcRect As RECTF) As Boolean +Friend Function DrawRectangleF_FromRectF(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DPen, ByRef srcRect As RectF) As Boolean DrawRectangleF_FromRectF = Me.DrawRectangleF(dstSurface, srcPen, srcRect.Left, srcRect.Top, srcRect.Width, srcRect.Height) End Function @@ -498,11 +498,11 @@ Public Function DrawRectangleI_AbsoluteCoords(ByRef dstSurface As pd2DSurface, B DrawRectangleI_AbsoluteCoords = Me.DrawRectangleI(dstSurface, srcPen, rectLeft, rectTop, rectRight - rectLeft, rectBottom - rectTop) End Function -Friend Function DrawRectangleI_FromRectL(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DPen, ByRef srcRect As RECTL) As Boolean +Friend Function DrawRectangleI_FromRectL(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DPen, ByRef srcRect As RectL) As Boolean DrawRectangleI_FromRectL = Me.DrawRectangleI(dstSurface, srcPen, srcRect.Left, srcRect.Top, srcRect.Right - srcRect.Left, srcRect.Bottom - srcRect.Top) End Function -Friend Function DrawRoundRectangleF_FromRectF(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DPen, ByRef srcRect As RECTF, ByVal cornerRadius As Single) As Boolean +Friend Function DrawRoundRectangleF_FromRectF(ByRef dstSurface As pd2DSurface, ByRef srcPen As pd2DPen, ByRef srcRect As RectF, ByVal cornerRadius As Single) As Boolean 'GDI+ has no internal rounded rect function, so we need to manually construct our own path. Dim tmpPath As pd2DPath @@ -542,7 +542,7 @@ Public Function FillEllipseF_AbsoluteCoords(ByRef dstSurface As pd2DSurface, ByR FillEllipseF_AbsoluteCoords = Me.FillEllipseF(dstSurface, srcBrush, ellipseLeft, ellipseTop, ellipseRight - ellipseLeft, ellipseBottom - ellipseTop) End Function -Friend Function FillEllipseF_FromRectF(ByRef dstSurface As pd2DSurface, ByRef srcBrush As pd2DBrush, ByRef srcRect As RECTF) As Boolean +Friend Function FillEllipseF_FromRectF(ByRef dstSurface As pd2DSurface, ByRef srcBrush As pd2DBrush, ByRef srcRect As RectF) As Boolean FillEllipseF_FromRectF = Me.FillEllipseF(dstSurface, srcBrush, srcRect.Left, srcRect.Top, srcRect.Width, srcRect.Height) End Function @@ -559,7 +559,7 @@ Public Function FillEllipseI_AbsoluteCoords(ByRef dstSurface As pd2DSurface, ByR FillEllipseI_AbsoluteCoords = Me.FillEllipseI(dstSurface, srcBrush, ellipseLeft, ellipseTop, ellipseRight - ellipseLeft, ellipseBottom - ellipseTop) End Function -Friend Function FillEllipseI_FromRectL(ByRef dstSurface As pd2DSurface, ByRef srcBrush As pd2DBrush, ByRef srcRect As RECTL) As Boolean +Friend Function FillEllipseI_FromRectL(ByRef dstSurface As pd2DSurface, ByRef srcBrush As pd2DBrush, ByRef srcRect As RectL) As Boolean FillEllipseI_FromRectL = Me.FillEllipseI(dstSurface, srcBrush, srcRect.Left, srcRect.Top, srcRect.Right - srcRect.Left, srcRect.Bottom - srcRect.Top) End Function @@ -611,7 +611,7 @@ Public Function FillRectangleF_AbsoluteCoords(ByRef dstSurface As pd2DSurface, B FillRectangleF_AbsoluteCoords = Me.FillRectangleF(dstSurface, srcBrush, rectLeft, rectTop, rectRight - rectLeft, rectBottom - rectTop) End Function -Friend Function FillRectangleF_FromRectF(ByRef dstSurface As pd2DSurface, ByRef srcBrush As pd2DBrush, ByRef srcRect As RECTF) As Boolean +Friend Function FillRectangleF_FromRectF(ByRef dstSurface As pd2DSurface, ByRef srcBrush As pd2DBrush, ByRef srcRect As RectF) As Boolean FillRectangleF_FromRectF = Me.FillRectangleF(dstSurface, srcBrush, srcRect.Left, srcRect.Top, srcRect.Width, srcRect.Height) End Function @@ -628,7 +628,7 @@ Public Function FillRectangleI_AbsoluteCoords(ByRef dstSurface As pd2DSurface, B FillRectangleI_AbsoluteCoords = Me.FillRectangleI(dstSurface, srcBrush, rectLeft, rectTop, rectRight - rectLeft, rectBottom - rectTop) End Function -Friend Function FillRectangleI_FromRectL(ByRef dstSurface As pd2DSurface, ByRef srcBrush As pd2DBrush, ByRef srcRect As RECTL) As Boolean +Friend Function FillRectangleI_FromRectL(ByRef dstSurface As pd2DSurface, ByRef srcBrush As pd2DBrush, ByRef srcRect As RectL) As Boolean FillRectangleI_FromRectL = Me.FillRectangleI(dstSurface, srcBrush, srcRect.Left, srcRect.Top, srcRect.Right - srcRect.Left, srcRect.Bottom - srcRect.Top) End Function @@ -649,7 +649,7 @@ Friend Function FillRoundRectangleF(ByRef dstSurface As pd2DSurface, ByRef srcBr End Function -Friend Function FillRoundRectangleF_FromRectF(ByRef dstSurface As pd2DSurface, ByRef srcBrush As pd2DBrush, ByRef srcRect As RECTF, ByVal cornerRadius As Single) As Boolean +Friend Function FillRoundRectangleF_FromRectF(ByRef dstSurface As pd2DSurface, ByRef srcBrush As pd2DBrush, ByRef srcRect As RectF, ByVal cornerRadius As Single) As Boolean 'GDI+ has no internal rounded rect function, so we need to manually construct our own path. Dim tmpPath As pd2DPath diff --git a/Classes/pd2DPath.cls b/Classes/pd2DPath.cls index 68e8035a14..e465d10960 100644 --- a/Classes/pd2DPath.cls +++ b/Classes/pd2DPath.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Graphics Path Wrapper -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 17/October/14 (though assembled from various parts written much earlier) 'Last updated: 18/June/16 'Last update: continued work on bringing this class into the pd2D fold @@ -154,7 +154,7 @@ Friend Sub AddEllipse_Relative(ByVal x1 As Single, ByVal y1 As Single, ByVal ell End Select End Sub -Friend Sub AddEllipse_RectF(ByRef srcRect As RECTF) +Friend Sub AddEllipse_RectF(ByRef srcRect As RectF) If (m_PathHandle = 0) Then CreatePath Select Case m_PathBackend Case P2_DefaultBackend, P2_GDIPlusBackend @@ -196,7 +196,7 @@ Friend Sub AddLinesInt(ByVal numOfPoints As Long, ByVal ptrToPtLArray As Long) End Select End Sub -Friend Sub AddArc(ByRef ellipseBoundRect As RECTF, ByVal startAngle As Single, ByVal sweepAngle As Single) +Friend Sub AddArc(ByRef ellipseBoundRect As RectF, ByVal startAngle As Single, ByVal sweepAngle As Single) If (m_PathHandle = 0) Then CreatePath Select Case m_PathBackend Case P2_DefaultBackend, P2_GDIPlusBackend @@ -284,8 +284,8 @@ Friend Sub AddPolygon_Regular(ByVal numOfSides As Long, ByVal pRadius As Single, If (m_PathHandle = 0) Then CreatePath 'Regardless of backend, we start by establishing the polygon's points using basic geometry. - Dim polyPoints() As POINTFLOAT - ReDim polyPoints(0 To numOfSides - 1) As POINTFLOAT + Dim polyPoints() As PointFloat + ReDim polyPoints(0 To numOfSides - 1) As PointFloat Dim i As Long For i = 0 To numOfSides - 1 @@ -334,7 +334,7 @@ Friend Sub AddRectangle_Relative(ByVal x1 As Single, ByVal y1 As Single, ByVal r End Select End Sub -Friend Sub AddRectangle_RectF(ByRef srcRect As RECTF) +Friend Sub AddRectangle_RectF(ByRef srcRect As RectF) If (m_PathHandle = 0) Then CreatePath Select Case m_PathBackend Case P2_DefaultBackend, P2_GDIPlusBackend @@ -344,7 +344,7 @@ Friend Sub AddRectangle_RectF(ByRef srcRect As RECTF) End Select End Sub -Friend Sub AddRoundedRectangle_RectF(ByRef srcRect As RECTF, ByVal cornerRadius As Single) +Friend Sub AddRoundedRectangle_RectF(ByRef srcRect As RectF, ByVal cornerRadius As Single) If (m_PathHandle = 0) Then CreatePath @@ -410,8 +410,8 @@ Friend Sub AddTriangle(ByVal x1 As Single, ByVal y1 As Single, ByVal x2 As Singl If (m_PathHandle = 0) Then CreatePath 'Convert the incoming points to a float array and use the generic polygon wrapper to add 'em - Dim tmpPoints() As POINTFLOAT - ReDim tmpPoints(0 To 2) As POINTFLOAT + Dim tmpPoints() As PointFloat + ReDim tmpPoints(0 To 2) As PointFloat tmpPoints(0).x = x1 tmpPoints(0).y = y1 @@ -482,15 +482,15 @@ End Sub 'This is a little silly, but this function creates a squiggly line inside the target rectangle. It provides a nice shorthand ' method for previewing something like a pen against an arbitrary path. -Friend Sub CreateSamplePathForRect(ByRef srcRect As RECTF, Optional ByVal hPadding As Single = 0, Optional ByVal vPadding As Single = 0) +Friend Sub CreateSamplePathForRect(ByRef srcRect As RectF, Optional ByVal hPadding As Single = 0, Optional ByVal vPadding As Single = 0) If (m_PathHandle = 0) Then CreatePath 'A sample path is just a nice little curve that demonstrates a few obvious path elements for the user - Dim samplePoints() As POINTFLOAT - ReDim samplePoints(0 To 8) As POINTFLOAT + Dim samplePoints() As PointFloat + ReDim samplePoints(0 To 8) As PointFloat - Dim sampleRect As RECTF + Dim sampleRect As RectF With sampleRect .Left = srcRect.Left + hPadding .Top = srcRect.Top + vPadding @@ -589,7 +589,7 @@ Friend Function RotatePathAroundItsCenter(ByRef rotateAngle As Single) As Boolea ResetInternalTransform 'Figure out the path's center - Dim pathRect As RECTF + Dim pathRect As RectF pathRect = Me.GetPathBoundariesF() 'Update the transformation matrix with a matching rotation @@ -610,7 +610,7 @@ Friend Function MirrorPathAroundItsCenter(ByVal mirrorHorizontal As Boolean, ByV ResetInternalTransform 'Figure out the path's center - Dim pathRect As RECTF + Dim pathRect As RectF pathRect = Me.GetPathBoundariesF() 'Update the transformation matrix with a matching mirror operation @@ -776,7 +776,7 @@ End Function 'Retrieve this path's boundaries. Optionally, you can also receive the path's boundaries as if they were drawn with ' a particular pen. (All pen settings are considered, including tricky things like corner mitering.) -Friend Function GetPathBoundariesF(Optional ByRef testPen As pd2DPen = Nothing, Optional ByVal testTransform As pd2DTransform = Nothing) As RECTF +Friend Function GetPathBoundariesF(Optional ByRef testPen As pd2DPen = Nothing, Optional ByVal testTransform As pd2DTransform = Nothing) As RectF If (m_PathHandle <> 0) Then @@ -810,7 +810,7 @@ Friend Function GetPathBoundariesF(Optional ByRef testPen As pd2DPen = Nothing, End Function -Friend Function GetPathBoundariesL(Optional ByRef testPen As pd2DPen = Nothing, Optional ByVal testTransform As pd2DTransform = Nothing) As RECTL +Friend Function GetPathBoundariesL(Optional ByRef testPen As pd2DPen = Nothing, Optional ByVal testTransform As pd2DTransform = Nothing) As RectL If (m_PathHandle <> 0) Then diff --git a/Classes/pd2DPen.cls b/Classes/pd2DPen.cls index c94e912628..efe697691b 100644 --- a/Classes/pd2DPen.cls +++ b/Classes/pd2DPen.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Graphics Outline ("Pen" in GDI/GDI+ parlance) Class -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 04/July/15 (but assembled from many bits written earlier) 'Last updated: 13/May/16 'Last update: total overhaul diff --git a/Classes/pd2DRegion.cls b/Classes/pd2DRegion.cls index f707d36c0a..b3b64fd0b1 100644 --- a/Classes/pd2DRegion.cls +++ b/Classes/pd2DRegion.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Region Class -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 18/June/16 (but assembled from many bits written earlier) 'Last updated: 19/June/16 'Last update: continue expanding functionality @@ -50,7 +50,7 @@ Friend Function AddRectangleF(ByVal rLeft As Single, ByVal rTop As Single, ByVal If (m_RegionHandle = 0) Then Me.CreateRegion - Dim tmpRectF As RECTF + Dim tmpRectF As RectF tmpRectF.Left = rLeft tmpRectF.Top = rTop tmpRectF.Width = rWidth @@ -63,7 +63,7 @@ Friend Function AddRectangleF(ByVal rLeft As Single, ByVal rTop As Single, ByVal End Function -Friend Function AddRectangle_FromRectF(ByRef srcRectF As RECTF, Optional ByVal useCombineMode As PD_2D_CombineMode = P2_CM_Replace) As Boolean +Friend Function AddRectangle_FromRectF(ByRef srcRectF As RectF, Optional ByVal useCombineMode As PD_2D_CombineMode = P2_CM_Replace) As Boolean If (m_RegionHandle = 0) Then Me.CreateRegion @@ -74,7 +74,7 @@ Friend Function AddRectangle_FromRectF(ByRef srcRectF As RECTF, Optional ByVal u End Function -Friend Function AddRectangle_FromRectL(ByRef srcRectL As RECTL, Optional ByVal useCombineMode As PD_2D_CombineMode = P2_CM_Replace) As Boolean +Friend Function AddRectangle_FromRectL(ByRef srcRectL As RectL, Optional ByVal useCombineMode As PD_2D_CombineMode = P2_CM_Replace) As Boolean If (m_RegionHandle = 0) Then Me.CreateRegion @@ -118,7 +118,7 @@ Friend Function CloneRegion(ByRef srcRegion As pd2DRegion) As Boolean End Function -Friend Function GetRegionBoundsF() As RECTF +Friend Function GetRegionBoundsF() As RectF If (m_RegionHandle <> 0) Then Select Case m_RegionBackend Case P2_DefaultBackend, P2_GDIPlusBackend @@ -127,7 +127,7 @@ Friend Function GetRegionBoundsF() As RECTF End If End Function -Friend Function GetRegionBoundsL() As RECTL +Friend Function GetRegionBoundsL() As RectL If (m_RegionHandle <> 0) Then Select Case m_RegionBackend Case P2_DefaultBackend, P2_GDIPlusBackend diff --git a/Classes/pd2DSurface.cls b/Classes/pd2DSurface.cls index 76aff10cd6..0cc5a95254 100644 --- a/Classes/pd2DSurface.cls +++ b/Classes/pd2DSurface.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon 2D Rendering Surface class -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 01/September/12 'Last updated: 10/May/16 'Last update: split surface-specific capabilities out from GDI+ and into a safe wrapper @@ -54,7 +54,7 @@ Private m_SurfaceDC As Long 'The caller can optionally provide the hWnd, if any, associated with the DC above. This allows us to automagically ' detect size changes. Private m_SurfaceHWnd As Long -Private m_ClientRect As RECTL +Private m_ClientRect As RectL 'If the caller does *not* supply an hWnd, they need to pass surface dimensions. (DCs are dimension-less.) Private m_SurfaceWidthCaller As Single, m_SurfaceHeightCaller As Single @@ -267,13 +267,13 @@ Friend Function SetSurfaceClip_FromRectangle(ByVal rectLeft As Single, ByVal rec End Function -Friend Function SetSurfaceClip_FromRectF(ByRef srcRectF As RECTF, Optional ByVal useCombineMode As PD_2D_CombineMode = P2_CM_Replace) As Boolean +Friend Function SetSurfaceClip_FromRectF(ByRef srcRectF As RectF, Optional ByVal useCombineMode As PD_2D_CombineMode = P2_CM_Replace) As Boolean With srcRectF SetSurfaceClip_FromRectF = SetSurfaceClip_FromRectangle(.Left, .Top, .Width, .Height) End With End Function -Friend Function SetSurfaceClip_FromRectL(ByRef srcRectL As RECTL, Optional ByVal useCombineMode As PD_2D_CombineMode = P2_CM_Replace) As Boolean +Friend Function SetSurfaceClip_FromRectL(ByRef srcRectL As RectL, Optional ByVal useCombineMode As PD_2D_CombineMode = P2_CM_Replace) As Boolean With srcRectL SetSurfaceClip_FromRectL = SetSurfaceClip_FromRectangle(.Left, .Top, .Right - .Left, .Bottom - .Top) End With @@ -585,7 +585,7 @@ Private Function InternalGDIPlusLoadImage(ByVal hGdipImage As Long, Optional ByV End With 'Next, prepare a clipping rect - Dim tmpRect As RECTL + Dim tmpRect As RectL With tmpRect .Left = 0 .Top = 0 diff --git a/Classes/pd2DTransform.cls b/Classes/pd2DTransform.cls index 6f0d286ddc..f04569b65c 100644 --- a/Classes/pd2DTransform.cls +++ b/Classes/pd2DTransform.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon 2D Transformation manager -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 09/May/15 (though assembled from various parts written much earlier) 'Last updated: 22/June/15 'Last update: add x/y shear support @@ -207,7 +207,7 @@ Friend Function ApplyTransformToPointFs(ByVal ptrToFirstPointF As Long, ByVal nu End Select End Function -Friend Function ApplyTransformToPointF(ByRef srcPoint As POINTFLOAT) As Boolean +Friend Function ApplyTransformToPointF(ByRef srcPoint As PointFloat) As Boolean If (m_TransformHandle = 0) Then CreateTransform Select Case m_TransformBackend Case P2_DefaultBackend, P2_GDIPlusBackend @@ -223,7 +223,7 @@ Friend Function ApplyTransformToXY(ByRef srcX As Single, ByRef srcY As Single) A Case P2_DefaultBackend, P2_GDIPlusBackend 'Create a temporary POINTFLOAT struct - Dim tmpPoint As POINTFLOAT + Dim tmpPoint As PointFloat tmpPoint.x = srcX tmpPoint.y = srcY diff --git a/Classes/pdAsyncPipe.cls b/Classes/pdAsyncPipe.cls index fbbde7bf04..90323a1831 100644 --- a/Classes/pdAsyncPipe.cls +++ b/Classes/pdAsyncPipe.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Async ExifTool Interface -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 24/October/17 'Last updated: 25/October/17 'Last update: migrate code from hacked-up UserControl to dedicated class; large-scale code clean-up and diff --git a/Classes/pdCaption.cls b/Classes/pdCaption.cls index 04ac5f7931..629c334964 100644 --- a/Classes/pdCaption.cls +++ b/Classes/pdCaption.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon "Caption" support class for user controls -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 27/August/15 'Last updated: 28/October/15 'Last update: rewrite the class to use a program-level cache of requested caption sizes. This spares us from needing to diff --git a/Classes/pdClipboard.cls b/Classes/pdClipboard.cls index 6f3aa086ee..18a170f852 100644 --- a/Classes/pdClipboard.cls +++ b/Classes/pdClipboard.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Clipboard Interface -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 06/November/15 (formally split off from a heavily modified cCustomClipboard by Steve McMahon) 'Last updated: 30/March/17 'Last update: new support for metafile clipboard data diff --git a/Classes/pdClipboardMain.cls b/Classes/pdClipboardMain.cls index 9ebdc909bf..552908f010 100644 --- a/Classes/pdClipboardMain.cls +++ b/Classes/pdClipboardMain.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Clipboard Interface -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 15/April/01 'Last updated: 27/October/17 'Last update: fix drag/drop from Firefox, which broke at some point in the past (idk when) diff --git a/Classes/pdColorSearch.cls b/Classes/pdColorSearch.cls index 3dc9da716d..9ddbf35d84 100644 --- a/Classes/pdColorSearch.cls +++ b/Classes/pdColorSearch.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Self-pruning Octree-based Color Lookup Class -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 14/January/17 'Last updated: 15/January/17 'Last update: implement the self-pruning behavior, by only passing colors down branches as absolutely necessary. @@ -54,7 +54,7 @@ Private Sub Class_Initialize() Set m_RootNode = New pdColorSearchNode End Sub -Friend Sub CreateColorTree(ByRef srcPalette() As RGBQUAD) +Friend Sub CreateColorTree(ByRef srcPalette() As RGBQuad) 'Start by creating the root node m_RootNode.NodeInitialize 0, srcPalette @@ -67,7 +67,7 @@ Friend Sub CreateColorTree(ByRef srcPalette() As RGBQUAD) End Sub -Friend Function GetNearestPaletteIndex(ByRef srcColor As RGBQUAD) As Long +Friend Function GetNearestPaletteIndex(ByRef srcColor As RGBQuad) As Long Dim tmpDistance As Long GetNearestPaletteIndex = m_RootNode.GetNearestColorIndex(srcColor, tmpDistance) End Function diff --git a/Classes/pdColorSearchNode.cls b/Classes/pdColorSearchNode.cls index abdd0b3b59..5f68c73d8f 100644 --- a/Classes/pdColorSearchNode.cls +++ b/Classes/pdColorSearchNode.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Self-pruning Octree-based Color Lookup Class (Node only) -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 14/January/17 'Last updated: 15/January/17 'Last update: implement self-pruning behavior, by only passing colors down branches as absolutely necessary. @@ -36,7 +36,7 @@ Private Const CUSTOM_WEIGHT_BLUE As Single = 0.114 'Local copy of the master palette. By caching this, we can perform all internal comparisons via palette ' index instead of by color. This provides a meaningful performance boost, given that we'll traverse the ' tree millions of times on a typical image. -Private m_ColorList() As RGBQUAD +Private m_ColorList() As RGBQuad 'Depth of this node. Nodes on the outermost level of the tree return their color directly, ' rather than querying child nodes. @@ -55,13 +55,13 @@ Private m_BitShiftMasks() As Long Private m_ChildNodes(0 To 7) As pdColorSearchNode 'Constructor -Friend Sub NodeInitialize(ByVal nodeDepth As Long, ByRef masterColorList() As RGBQUAD) +Friend Sub NodeInitialize(ByVal nodeDepth As Long, ByRef masterColorList() As RGBQuad) m_Depth = nodeDepth 'Caching the full color list in each node requires little memory, and it potentially accelerates ' a number of search-related functions. - ReDim m_ColorList(0 To UBound(masterColorList)) As RGBQUAD + ReDim m_ColorList(0 To UBound(masterColorList)) As RGBQuad CopyMemory ByVal VarPtr(m_ColorList(0)), ByVal VarPtr(masterColorList(0)), UBound(masterColorList) * 4 + 4 End Sub @@ -125,7 +125,7 @@ Friend Sub AddColor(ByVal colorIndex As Long) End Sub -Friend Function GetNearestColorIndex(ByRef srcColor As RGBQUAD, ByRef dstToColor As Long) As Long +Friend Function GetNearestColorIndex(ByRef srcColor As RGBQuad, ByRef dstToColor As Long) As Long 'There are two reasons to return a color immediately, rather than further traversing the tree. ' 1) This node directly stores a color (meaning it has no child nodes) @@ -201,7 +201,7 @@ End Function 'Note that RGB order does not actually matter, meaning you could map RGB channels to any particular ' bit-order. They are always mapped to identical subtrees (e.g. changing the order of the subtrees ' doesn't actually change the colors returned). -Private Function GetOctIndex(ByRef srcColor As RGBQUAD, ByVal treeDepth As Long) As Long +Private Function GetOctIndex(ByRef srcColor As RGBQuad, ByVal treeDepth As Long) As Long If (srcColor.Red And m_BitShiftMasks(treeDepth)) <> 0 Then GetOctIndex = 1 If (srcColor.Green And m_BitShiftMasks(treeDepth)) <> 0 Then GetOctIndex = GetOctIndex Or 2 If (srcColor.Blue And m_BitShiftMasks(treeDepth)) <> 0 Then GetOctIndex = GetOctIndex Or 4 diff --git a/Classes/pdCompositor.cls b/Classes/pdCompositor.cls index d12c82586a..d0bd6d9c37 100644 --- a/Classes/pdCompositor.cls +++ b/Classes/pdCompositor.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Image Compositor class -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 01/May/14 'Last updated: 04/November/16 'Last update: add support for scratch layer integration diff --git a/Classes/pdCrypto.cls b/Classes/pdCrypto.cls index 3c2fc4d7ad..ed86888fc9 100644 --- a/Classes/pdCrypto.cls +++ b/Classes/pdCrypto.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Cryptography (and Hash) Helper Class -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 19/August/16 'Last updated: 09/September/17 'Last update: minor code-cleanup, including removal of legacy functions diff --git a/Classes/pdDIB.cls b/Classes/pdDIB.cls index 1b2e41b073..f681b1a498 100644 --- a/Classes/pdDIB.cls +++ b/Classes/pdDIB.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon DIB Wrapper class (formerly known as "pdLayer") -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 29/August/12 'Last updated: 18/April/17 'Last update: store the original file format in a proper PDIF enum diff --git a/Classes/pdDebug.cls b/Classes/pdDebug.cls index a4d74b11d4..9f4cf4b5e4 100644 --- a/Classes/pdDebug.cls +++ b/Classes/pdDebug.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Custom Debug helper class -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 17/July/14 'Last updated: 28/August/17 'Last update: heavily optimized file writes by using pdFSO and a persistent append handle diff --git a/Classes/pdDictionary.cls b/Classes/pdDictionary.cls index 328d6a26e7..caac7b03e5 100644 --- a/Classes/pdDictionary.cls +++ b/Classes/pdDictionary.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Dictionary Class -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 16/October/14 'Last updated: 06/February/16 'Last update: minor bugfixes diff --git a/Classes/pdDisplay.cls b/Classes/pdDisplay.cls index 085eafad6a..b2654cc00c 100644 --- a/Classes/pdDisplay.cls +++ b/Classes/pdDisplay.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Display Device Manager (child class) -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 12/November/12 'Last updated: 18/September/15 'Last update: add additional failsafes just in case core display APIs fail @@ -40,7 +40,7 @@ Private m_Primary As Boolean Private m_AdapterName As String, m_FriendlyName As String, m_Description As String, m_DeviceID As String 'Display rect and working rect. (Working rect does not include chrome like taskbars.) -Private m_MonitorRect As RECTL, m_WorkingRect As RECTL +Private m_MonitorRect As RectL, m_WorkingRect As RectL 'Settings related to the monitor's EDID. These are only available on Vista+. Private m_hasEDID As Boolean @@ -96,19 +96,19 @@ Public Sub SetDeviceID(ByRef newDeviceID As String) m_DeviceID = newDeviceID End Sub -Friend Sub GetRect(ByRef dstRect As RECTL) +Friend Sub GetRect(ByRef dstRect As RectL) dstRect = m_MonitorRect End Sub -Friend Sub SetRect(ByRef srcRect As RECTL) +Friend Sub SetRect(ByRef srcRect As RectL) m_MonitorRect = srcRect End Sub -Friend Sub GetWorkingRect(ByRef dstRect As RECTL) +Friend Sub GetWorkingRect(ByRef dstRect As RectL) dstRect = m_WorkingRect End Sub -Friend Sub SetWorkingRect(ByRef srcRect As RECTL) +Friend Sub SetWorkingRect(ByRef srcRect As RectL) m_WorkingRect = srcRect End Sub diff --git a/Classes/pdDisplays.cls b/Classes/pdDisplays.cls index 3aa914ab54..f821d896c1 100644 --- a/Classes/pdDisplays.cls +++ b/Classes/pdDisplays.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Display Device Manager (parent class) -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 12/November/2012 'Last updated: 18/September/15 'Last update: add additional failsafes just in case core display APIs fail diff --git a/Classes/pdEdgeDetector.cls b/Classes/pdEdgeDetector.cls index 3f83f0137a..254aa69a0c 100644 --- a/Classes/pdEdgeDetector.cls +++ b/Classes/pdEdgeDetector.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Edge Detector ("Marching squares") Engine -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 05/January/17 'Last updated: 09/May/17 'Last update: add comprehensive edge detection (e.g. edges of *multiple* objects in one image) @@ -69,7 +69,7 @@ Private Declare Function GdipIsVisiblePathPointI Lib "gdiplus" (ByVal hPath As L Private Declare Function GdipIsVisibleRegionPointI Lib "gdiplus" (ByVal hRegion As Long, ByVal x As Long, ByVal y As Long, ByVal hGraphicsOptional As Long, ByRef dstResult As Long) As GP_Result Private Declare Function GdipGetRegionScansCount Lib "gdiplus" (ByVal hRegion As Long, ByRef dstRectCount As Long, ByVal optTransformMatrix As Long) As GP_Result Private Declare Function GdipGetRegionScansI Lib "gdiplus" (ByVal hRegion As Long, ByVal ptrToRectLArray As Long, ByRef dstNumOfRects As Long, ByVal optTransformMatrix As Long) As GP_Result -Private m_RectLCache() As RECTL, m_SizeOfRectCache As Long +Private m_RectLCache() As RectL, m_SizeOfRectCache As Long 'If you don't want to find a starting point yourself, use this helper function to do it for you. ' The starting point is searched for starting in the top-left corner and moving LTR. @@ -191,11 +191,11 @@ End Sub 'After the path algorithm finishes, the caller needs to retrieve the final point list. Because PD performs ' all rendering in floating-point coordinates, this function exists to make transfers easier. -Friend Sub RetrieveFinalPolygon(ByRef dstPoints() As POINTFLOAT, ByRef numOfPoints As Long) +Friend Sub RetrieveFinalPolygon(ByRef dstPoints() As PointFloat, ByRef numOfPoints As Long) numOfPoints = m_StackPosition - ReDim dstPoints(0 To numOfPoints - 1) As POINTFLOAT + ReDim dstPoints(0 To numOfPoints - 1) As PointFloat Dim i As Long For i = 0 To numOfPoints - 1 @@ -254,7 +254,7 @@ Friend Function FindAllEdges(ByRef dstPath As pd2DPath, ByRef srcArray() As Byte 'To improve performance, we're going to point a transient 1D array at certain rows during processing. ' This requires unsafe array manipulation, but it can be meaningfully faster than 2D array accesses. - Dim tmpArray() As Byte, tmpSA As SAFEARRAY1D + Dim tmpArray() As Byte, tmpSA As SafeArray1D 'Populate the safearray struct's unchanging values Dim srcArrayBasePointer As Long, srcArrayStride As Long @@ -277,7 +277,7 @@ Friend Function FindAllEdges(ByRef dstPath As pd2DPath, ByRef srcArray() As Byte PutMem4 VarPtrArray(tmpArray()), VarPtr(tmpSA) 'And now, a duplicate of the above steps, but designed for the outer loop - Dim tmpMasterArray() As Byte, tmpMasterSA As SAFEARRAY1D + Dim tmpMasterArray() As Byte, tmpMasterSA As SafeArray1D Dim srcMasterPointer As Long, srcMasterStride As Long srcMasterPointer = VarPtr(srcArray(0, 0)) srcMasterStride = UBound(srcArray(), 1) + 1 @@ -431,7 +431,7 @@ Friend Function FindAllEdges(ByRef dstPath As pd2DPath, ByRef srcArray() As Byte ' nothing but basic rectangles. If (numOfRects > m_SizeOfRectCache) Then m_SizeOfRectCache = numOfRects - ReDim m_RectLCache(0 To m_SizeOfRectCache - 1) As RECTL + ReDim m_RectLCache(0 To m_SizeOfRectCache - 1) As RectL End If If (GdipGetRegionScansI(tmpGdipHandle, VarPtr(m_RectLCache(0)), numOfRects, tmpMatrix) = GP_OK) Then diff --git a/Classes/pdEditBoxW.cls b/Classes/pdEditBoxW.cls index b7bcd6a510..e02e6b1778 100644 --- a/Classes/pdEditBoxW.cls +++ b/Classes/pdEditBoxW.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Unicode Text Box control -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 03/November/14 'Last updated: 17/June/17 'Last update: attempted fix for issues reported at https://github.com/tannerhelland/PhotoDemon/commit/25870dd93ae74e79fa146e88ee66989dd0223312 @@ -238,13 +238,6 @@ Private m_ParentHasBeenSubclassed As Boolean, m_ParentHWnd As Long ' This value will be set to TRUE if the API edit box currently has focus. Private m_HasFocus As Boolean -'Because our API edit box is not tied into VB's default tab stop handling, we must jump through some hoops to forward focus correctly. -' Our hook proc will capture the Tab key that causes focus to enter the control, and mistakenly assume it is a Tab keypress from -' *within* the control. To prevent this from happening, we enforce a slight time delay from when our hook procedure begins, to when -' we capture Tab keypresses. This prevents faulty Tab-key handling. -' 10/Aug/2017: disabled pending further testing; our new hook solution may not require this trickery -' Private m_TimeAtFocusEnter As Long - 'The system handles drawing of the edit box. These persistent brush and font handles are passed to the relevant ' window messages, and WAPI uses them when rendering the edit box and associated text. Private m_EditBoxBrush As Long, m_EditBoxFont As Long diff --git a/Classes/pdFFT.cls b/Classes/pdFFT.cls index 42801070ad..26dd4d089f 100644 --- a/Classes/pdFFT.cls +++ b/Classes/pdFFT.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon FFT Class -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 27/February/15 'Last updated: 07/September/16 'Last update: code cleanup and optimizations diff --git a/Classes/pdFSO.cls b/Classes/pdFSO.cls index 3ac1ecdd29..262264ed3f 100644 --- a/Classes/pdFSO.cls +++ b/Classes/pdFSO.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon File System Object Interface -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 04/February/15 'Last updated: 17/July/17 'Last update: large code cleanup diff --git a/Classes/pdFilterLUT.cls b/Classes/pdFilterLUT.cls index 7bb3c6955e..b3b4855618 100644 --- a/Classes/pdFilterLUT.cls +++ b/Classes/pdFilterLUT.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Filter LUT (Look Up Table) Support Class -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 15/January/15 'Last updated: 16/January/15 'Last update: continue fleshing out features @@ -225,7 +225,7 @@ End Sub ' before exiting, but I mention this because it will cause any cached unsafe array pointers (e.g. VarPtr) to be invalid. ' ' 3) srcArray doesn't have to be initialized. This function will do it for you. -Friend Sub FillLUT_Curve(ByRef srcArray() As Byte, ByRef curvePoints() As POINTFLOAT) +Friend Sub FillLUT_Curve(ByRef srcArray() As Byte, ByRef curvePoints() As PointFloat) 'Start by setting up default parameters for the source array FillLUT_Default srcArray @@ -239,7 +239,7 @@ Friend Sub FillLUT_Curve(ByRef srcArray() As Byte, ByRef curvePoints() As POINTF 'To prevent errors in the curve generation function, we will actually pad the curve point array with some dummy entries. ' These entries will be removed at the end of the function. - ReDim Preserve curvePoints(0 To numOfPoints + 1) As POINTFLOAT + ReDim Preserve curvePoints(0 To numOfPoints + 1) As PointFloat Dim i As Long Dim p() As Double, u() As Double @@ -285,7 +285,7 @@ Friend Sub FillLUT_Curve(ByRef srcArray() As Byte, ByRef curvePoints() As POINTF Next i 'Restore the original array bounds before exiting - ReDim Preserve curvePoints(0 To numOfPoints - 1) As POINTFLOAT + ReDim Preserve curvePoints(0 To numOfPoints - 1) As PointFloat End Sub @@ -383,7 +383,7 @@ Public Sub FillLUT_Threshold(ByRef srcArray() As Byte, Optional ByVal thresholdC End Sub 'Spline initialization function used by the Curve LUT generator. Call this function once prior to generating a curve. -Private Sub SetPandU(ByVal numOfPoints As Long, ByRef srcPoints() As POINTFLOAT, ByRef p() As Double, ByRef u() As Double) +Private Sub SetPandU(ByVal numOfPoints As Long, ByRef srcPoints() As PointFloat, ByRef p() As Double, ByRef u() As Double) Dim i As Long Dim d() As Double, w() As Double @@ -426,7 +426,7 @@ Private Sub SetPandU(ByVal numOfPoints As Long, ByRef srcPoints() As POINTFLOAT, End Sub 'Spline retrieval functions -Private Function GetCurvePoint(ByVal i As Long, ByVal v As Double, ByRef srcPoints() As POINTFLOAT, ByRef p() As Double, ByRef u() As Double) As Double +Private Function GetCurvePoint(ByVal i As Long, ByVal v As Double, ByRef srcPoints() As PointFloat, ByRef p() As Double, ByRef u() As Double) As Double Dim t As Double t = (v - srcPoints(i).x) / u(i) GetCurvePoint = t * srcPoints(i + 1).y + (1 - t) * srcPoints(i).y + u(i) * u(i) * (f(t) * p(i + 1) + f(1 - t) * p(i)) / 6# @@ -443,14 +443,14 @@ End Function 'Sample usage would be something like this, for a dramatic S-curve: ' Dim curvePoints() As POINTFLOAT ' pdFilterLUTInstance.helper_QuickCreateCurveArray curvePoints, 0, 0, 96, 72, 192, 160, 255, 255 -Friend Sub Helper_QuickCreateCurveArray(ByRef curvePoints() As POINTFLOAT, ParamArray listOfPoints() As Variant) +Friend Sub Helper_QuickCreateCurveArray(ByRef curvePoints() As PointFloat, ParamArray listOfPoints() As Variant) If UBound(listOfPoints) >= LBound(listOfPoints) Then Dim i As Long, numOfPoints As Long numOfPoints = (UBound(listOfPoints) - LBound(listOfPoints) + 1) \ 2 - ReDim curvePoints(0 To numOfPoints - 1) As POINTFLOAT + ReDim curvePoints(0 To numOfPoints - 1) As PointFloat For i = 0 To numOfPoints - 1 curvePoints(i).x = listOfPoints(i * 2) @@ -508,7 +508,7 @@ Public Function ApplyLUTsToDIB_Color(ByRef srcDIB As pdDIB, ByRef rLUT() As Byte 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D PrepSafeArray tmpSA, srcDIB CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 @@ -588,7 +588,7 @@ Public Function ApplyLUTsToDIB_Gray(ByRef srcDIB As pdDIB, ByRef gLUT() As Byte) 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D PrepSafeArray tmpSA, srcDIB CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 @@ -660,7 +660,7 @@ Public Function ApplyLUTToAllColorChannels(ByRef srcDIB As pdDIB, ByRef cLut() A 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D PrepSafeArray tmpSA, srcDIB CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 diff --git a/Classes/pdFilterSupport.cls b/Classes/pdFilterSupport.cls index 993ac82402..fd674b4006 100644 --- a/Classes/pdFilterSupport.cls +++ b/Classes/pdFilterSupport.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Filter Support Class -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 15/January/13 'Last updated: 21/May/14 'Last update: add new getColorsFromSource function, which can be used to RGB values from anywhere in the image, diff --git a/Classes/pdFloodFill.cls b/Classes/pdFloodFill.cls index 8c0ac7ae25..2a5330b6dd 100644 --- a/Classes/pdFloodFill.cls +++ b/Classes/pdFloodFill.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Flood Fill Engine -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 11/October/14 'Last updated: 13/May/17 'Last update: myriad performance improvements @@ -316,7 +316,7 @@ Private Function FloodFillContiguous(ByRef srcDIB As pdDIB) As Boolean Dim x As Long, y As Long, quickX As Long 'Generate direct references to the source and destination DIB data - Dim srcImageData() As Byte, srcSA As SAFEARRAY2D + Dim srcImageData() As Byte, srcSA As SafeArray2D PrepSafeArray srcSA, srcDIB CopyMemory ByVal VarPtrArray(srcImageData()), VarPtr(srcSA), 4 @@ -468,7 +468,7 @@ Private Function FloodFillContiguous_Scanline(ByRef srcDIB As pdDIB) As Boolean Dim x As Long, y As Long, quickX As Long 'Generate direct references to the source and destination DIB data - Dim srcImageData() As Byte, srcSA As SAFEARRAY2D + Dim srcImageData() As Byte, srcSA As SafeArray2D PrepSafeArray srcSA, srcDIB CopyMemory ByVal VarPtrArray(srcImageData()), VarPtr(srcSA), 4 @@ -530,7 +530,7 @@ Private Function FloodFillContiguous_Scanline(ByRef srcDIB As pdDIB) As Boolean 'To improve performance, we're going to point transient 1D arrays at certain 2D array rows during processing. ' This requires unsafe array manipulation, but it can be significantly faster than 2D array accesses (and because ' this function is scanline-oriented, the gains are even more significant). - Dim tmpImageLine() As Byte, tmpImageSA As SAFEARRAY1D + Dim tmpImageLine() As Byte, tmpImageSA As SafeArray1D 'Populate the safearray struct's unchanging values Dim srcImageBasePointer As Long, srcImageStride As Long @@ -553,7 +553,7 @@ Private Function FloodFillContiguous_Scanline(ByRef srcDIB As pdDIB) As Boolean PutMem4 VarPtrArray(tmpImageLine()), VarPtr(tmpImageSA) 'Repeat the above steps, but for a 1D array that points at the "already checked" tracking array - Dim tmpTrackingLine() As Byte, tmpTrackingSA As SAFEARRAY1D + Dim tmpTrackingLine() As Byte, tmpTrackingSA As SafeArray1D Dim srcTrackingBasePointer As Long, srcTrackingStride As Long srcTrackingBasePointer = VarPtr(m_AlreadyChecked(0, 0)) srcTrackingStride = m_BoundsX + 1 @@ -570,7 +570,7 @@ Private Function FloodFillContiguous_Scanline(ByRef srcDIB As pdDIB) As Boolean PutMem4 VarPtrArray(tmpTrackingLine()), VarPtr(tmpTrackingSA) 'And finally, repeat the above steps, but for a 1D array that points at the "fill results" tracking array - Dim tmpFillLine() As Byte, tmpFillSA As SAFEARRAY1D + Dim tmpFillLine() As Byte, tmpFillSA As SafeArray1D Dim srcFillBasePointer As Long, srcFillStride As Long srcFillBasePointer = VarPtr(m_FillResults(0, 0)) srcFillStride = m_BoundsX + 1 @@ -809,7 +809,7 @@ Private Function FloodFillGlobal(ByRef srcDIB As pdDIB) As Boolean Dim x As Long, y As Long, quickX As Long 'Generate direct references to the source and destination DIB data - Dim srcImageData() As Byte, srcSA As SAFEARRAY2D + Dim srcImageData() As Byte, srcSA As SafeArray2D PrepSafeArray srcSA, srcDIB CopyMemory ByVal VarPtrArray(srcImageData()), VarPtr(srcSA), 4 diff --git a/Classes/pdFocusDetector.cls b/Classes/pdFocusDetector.cls index 24ebfb876d..7673358d58 100644 --- a/Classes/pdFocusDetector.cls +++ b/Classes/pdFocusDetector.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Window Focus Detection class -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 07/May/15 (but built from many parts existing earlier) 'Last updated: 07/May/15 'Last update: abstract API focus detection bits into this class, so I don't have to keep copying the code into new UCs diff --git a/Classes/pdFont.cls b/Classes/pdFont.cls index 1f801fe462..182b436347 100644 --- a/Classes/pdFont.cls +++ b/Classes/pdFont.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Font Renderer -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 31/May/13 'Last updated: 25/August/17 'Last update: improve font creation performance diff --git a/Classes/pdFontCollection.cls b/Classes/pdFontCollection.cls index 521c89378d..ff4edd5ea1 100644 --- a/Classes/pdFontCollection.cls +++ b/Classes/pdFontCollection.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Font Collection Manager -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 12/May/15 'Last updated: 29/October/15 'Last update: allow the caller to request their own font matching mode. Some font caches in the program use a uniform font size, diff --git a/Classes/pdFormats.cls b/Classes/pdFormats.cls index d84563ea11..7bbca27820 100644 --- a/Classes/pdFormats.cls +++ b/Classes/pdFormats.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Image Format Manager -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 18/November/12 'Last updated: 02/May/16 'Last update: expand PNM variant support diff --git a/Classes/pdGlyphCollection.cls b/Classes/pdGlyphCollection.cls index b8844fe4ee..67247c4532 100644 --- a/Classes/pdGlyphCollection.cls +++ b/Classes/pdGlyphCollection.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Glyph Collection Interface -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 27/April/15 'Last updated: 19/May/15 'Last update: overhaul of the Uniscribe interface to use a class system (m_Uniscribe is the relevant instance) diff --git a/Classes/pdICCProfile.cls b/Classes/pdICCProfile.cls index 2ce0a03773..02454b9db4 100644 --- a/Classes/pdICCProfile.cls +++ b/Classes/pdICCProfile.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon ICC (International Color Consortium) Profile Manager -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 05/November/13 'Last updated: 21/November/16 'Last update: allow the class to create profiles directly from arbitrary files diff --git a/Classes/pdImage.cls b/Classes/pdImage.cls index 4b8514e95a..f15964988e 100644 --- a/Classes/pdImage.cls +++ b/Classes/pdImage.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Image class -'Copyright 2006-2017 by Tanner Helland +'Copyright 2006-2018 by Tanner Helland 'Created: sometime 2006 'Last updated: 13/September/15 'Last update: convert imgStorage to pdDictionary, so we can drop the run-time scrrun.dll requirement diff --git a/Classes/pdInputKeyboard.cls b/Classes/pdInputKeyboard.cls index 7a140a3ef9..53944ef424 100644 --- a/Classes/pdInputKeyboard.cls +++ b/Classes/pdInputKeyboard.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Keyboard Input Handler class -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 27/May/14 (though many individual parts existed earlier than this!) 'Last updated: 09/February/17 'Last update: convert to safer subclassing via comctl32 diff --git a/Classes/pdInputMouse.cls b/Classes/pdInputMouse.cls index 467af655e2..3e4e1211a1 100644 --- a/Classes/pdInputMouse.cls +++ b/Classes/pdInputMouse.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Mouse Input Handler (mouse, pen, etc) class -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 27/May/14 (though many individual parts existed earlier than this!) 'Last updated: 07/Feburary/17 'Last update: large overhaul as part of moving to comctl32 subclassing diff --git a/Classes/pdLCMSProfile.cls b/Classes/pdLCMSProfile.cls index 34b9c4afd3..f091c77a02 100644 --- a/Classes/pdLCMSProfile.cls +++ b/Classes/pdLCMSProfile.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon LCMS (LittleCMS) Color Profile Manager -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 26/May/16 'Last updated: 09/June/16 'Last update: add support for linear RGB profiles diff --git a/Classes/pdLCMSTransform.cls b/Classes/pdLCMSTransform.cls index 77b2fa2bc0..ff2f6ee63f 100644 --- a/Classes/pdLCMSTransform.cls +++ b/Classes/pdLCMSTransform.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon LCMS (LittleCMS) Transformation Manager -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 26/May/16 'Last updated: 09/June/16 'Last update: add support for RGB modification transforms, which allow adjustment of brightness, contrast, hue, and saturation diff --git a/Classes/pdLastUsedSettings.cls b/Classes/pdLastUsedSettings.cls index ef8eb53bfb..0caad6c690 100644 --- a/Classes/pdLastUsedSettings.cls +++ b/Classes/pdLastUsedSettings.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Auto-Save Form Settings custom class -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 14/September/13 'Last updated: 26/June/14 'Last update: add recent localization fixes from the command bar UC version of this code diff --git a/Classes/pdLayer.cls b/Classes/pdLayer.cls index ffec3145d2..b458193a1c 100644 --- a/Classes/pdLayer.cls +++ b/Classes/pdLayer.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Layers class -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 29/August/12 'Last updated: 01/December/16 'Last update: start migrating ICC profile stuff from pdDIB to pdLayer (and the ColorManagement module) @@ -243,7 +243,7 @@ Private m_DIBChangedSinceLastHash() As Boolean 'If a layer has non-destructive, non-standard transformations active (e.g. rotation, skew), we use a special, parallelogram-based rendering function. ' To cut down on variable declarations, we declare this array once, and initialize it when a compositor instance is initialized. -Private m_PlgPoints() As POINTFLOAT +Private m_PlgPoints() As PointFloat 'Layers can be tagged with ICC profiles. These profiles do not need to match the current image's working profile. Before making ' color management decisions, make *certain* to note whether this layer is just tagged with a given profile, or whether it was @@ -929,7 +929,7 @@ End Function ' 1) Top-Right ' 2) Bottom-Left ' 3) (optionally) Bottom-Right. This point is optional because it can be inferred from the previous three -Friend Sub GetLayerCornerCoordinates(ByRef dstPoints() As POINTFLOAT) +Friend Sub GetLayerCornerCoordinates(ByRef dstPoints() As PointFloat) 'To simplify the work of translating layer boundaries by one or more affine transformations, we use a GraphicsMatrix object. Dim tmpMatrix As pd2DTransform @@ -970,7 +970,7 @@ End Sub ' rotation node *IN IMAGE COORDINATES*. Note that an array is required, and it must be at least (0, 4) in size. The first point contains ' the center point of the rotation node (e.g. the center of the current image), while subsequent points contain valid rotation nodes, which ' sit on the halfway point at each image boundary. -Friend Sub GetLayerRotationNodeCoordinates(ByRef dstPoints() As POINTFLOAT) +Friend Sub GetLayerRotationNodeCoordinates(ByRef dstPoints() As PointFloat) 'Retrieve a copy of the current layer transform matrix Dim tmpMatrix As pd2DTransform @@ -1055,11 +1055,11 @@ End Sub 'As of PhotoDemon 7.0, layers support one or more affine transformations (rotation, skew, etc). If the caller needs to determine ' layer boundaries with all affine transform operations considered, use this function. -Friend Sub GetLayerBoundaryRect(ByRef dstRect As RECTF) +Friend Sub GetLayerBoundaryRect(ByRef dstRect As RectF) 'Get a copy of the current layer coordinates - Dim layerCorners() As POINTFLOAT - ReDim layerCorners(0 To 3) As POINTFLOAT + Dim layerCorners() As PointFloat + ReDim layerCorners(0 To 3) As PointFloat Me.GetLayerCornerCoordinates layerCorners @@ -1101,7 +1101,7 @@ Friend Function GetAffineTransformedDIB(ByRef dstDIB As pdDIB, ByRef dstX As Lon FindMaxMinOfPointFs m_PlgPoints, 4, minX, minY, maxX, maxY 'Copy those values into a RECTF struct, for convenience - Dim layerRect As RECTF + Dim layerRect As RectF With layerRect .Left = minX .Top = minY @@ -1204,7 +1204,7 @@ End Function ' of the layer *IN IMAGE COORDINATES*. 'Given an array with at least upper bound 2, find the max and min x/y values. -Private Sub FindMaxMinOfPointFs(ByRef srcPoints() As POINTFLOAT, ByVal numOfPoints As Long, ByRef minX As Single, ByRef minY As Single, ByRef maxX As Single, ByRef maxY As Single) +Private Sub FindMaxMinOfPointFs(ByRef srcPoints() As PointFloat, ByVal numOfPoints As Long, ByRef minX As Single, ByRef minY As Single, ByRef maxX As Single, ByRef maxY As Single) If (srcPoints(0).x < srcPoints(1).x) Then minX = srcPoints(0).x @@ -1295,7 +1295,7 @@ Private Sub Class_Initialize() m_VectorDIBSynched = False 'Prep a default set of parallelogram corner points, in case the user decides to activate non-destructive transforms - ReDim m_PlgPoints(0 To 3) As POINTFLOAT + ReDim m_PlgPoints(0 To 3) As PointFloat 'Set default color management settings m_ICCProfileIndex = -1 @@ -1705,7 +1705,7 @@ Friend Function CropNullPaddedLayer() As Boolean 'Point an array at the layer's DIB data Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D PrepInternalSafeArray srcSA CopyMemory ByVal VarPtrArray(srcImageData()), VarPtr(srcSA), 4 @@ -2003,7 +2003,7 @@ Friend Function RequestThumbnail(ByRef dstThumbnailDIB As pdDIB, Optional ByVal 'If this is a non-standard request (e.g. a square thumbnail isn't needed), paint out the thumbnail at whatever ' size the caller wants. Note that they are responsible for preparing the target DIB in this scenario. Else - Dim tmpRectF As RECTF + Dim tmpRectF As RectF CopyMemory ByVal VarPtr(tmpRectF), ByVal ptrToRectF, LenB(tmpRectF) GDI_Plus.GDIPlus_StretchBlt dstThumbnailDIB, tmpRectF.Left, tmpRectF.Top, tmpRectF.Width, tmpRectF.Height, m_LayerThumbnail, 0!, 0!, m_LayerThumbnail.GetDIBWidth, m_LayerThumbnail.GetDIBHeight, , g_UserPreferences.GetThumbnailInterpolationPref(), , , , True End If @@ -2016,7 +2016,7 @@ Friend Function RequestThumbnail(ByRef dstThumbnailDIB As pdDIB, Optional ByVal End Function 'This function can be used to populate a valid SAFEARRAY2D structure against the layer's current DIB -Private Sub PrepInternalSafeArray(ByRef srcSA As SAFEARRAY2D) +Private Sub PrepInternalSafeArray(ByRef srcSA As SafeArray2D) 'Populate a relevant SafeArray variable for the supplied DIB With srcSA @@ -2059,7 +2059,7 @@ Friend Function CheckForPointOfInterest(ByVal imgX As Long, ByVal imgY As Long) 'To facilitate the notion of "generalized point of interest" handling, coordinate checks are performed against ' an array of potential POI targets. While arrays may not make as much sense as something like a RECT (when ' working with standard layers), it lets us generalize all coordinate checks into a single function, which is awesome! - Dim poiList() As POINTFLOAT + Dim poiList() As PointFloat 'Points of interest are sorted by layer type. In most cases, only the corners of a layer are interesting (as they control ' the layer's bounding box), but in the future, things like a Pen tool could have tons of points of interest. @@ -2069,7 +2069,7 @@ Friend Function CheckForPointOfInterest(ByVal imgX As Long, ByVal imgY As Long) Case PDL_IMAGE, PDL_TEXT, PDL_TYPOGRAPHY 'Manually populate the point of interest array with the layer's corner coordinates. - ReDim poiList(0 To 7) As POINTFLOAT + ReDim poiList(0 To 7) As PointFloat poiList(0).x = 0! poiList(0).y = 0! poiList(1).x = Me.GetLayerWidth(False) diff --git a/Classes/pdListSupport.cls b/Classes/pdListSupport.cls index 008927265d..6081fab56e 100644 --- a/Classes/pdListSupport.cls +++ b/Classes/pdListSupport.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon List Box support class -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 22/December/15 'Last updated: 18/February/16 'Last update: continued integration with pdListBoxView diff --git a/Classes/pdMRUManager.cls b/Classes/pdMRUManager.cls index 75670b0c8c..74e66028d9 100644 --- a/Classes/pdMRUManager.cls +++ b/Classes/pdMRUManager.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Generic Recent Files (MRU) List Manager -'Copyright 2005-2017 by Raj Chaudhuri and Tanner Helland +'Copyright 2005-2018 by Raj Chaudhuri and Tanner Helland 'Created: 16/February/15 'Last updated: 17/February/15 'Last updated by: Raj diff --git a/Classes/pdMRURecentMacros.cls b/Classes/pdMRURecentMacros.cls index c1e9e9ed2f..e74909dd1f 100644 --- a/Classes/pdMRURecentMacros.cls +++ b/Classes/pdMRURecentMacros.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Recent Files (MRU) handler for PD macros (Tools > Macros) -'Copyright 2005-2017 by Raj Chaudhuri and Tanner Helland +'Copyright 2005-2018 by Raj Chaudhuri and Tanner Helland 'Created: 17/February/15 'Last updated: 15/August/17 'Last update: implemented support for Unicode menu captions diff --git a/Classes/pdMedianCut.cls b/Classes/pdMedianCut.cls index 1f8cd2c910..e558851af7 100644 --- a/Classes/pdMedianCut.cls +++ b/Classes/pdMedianCut.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Median-Cut Color Quantization Class -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 12/January/17 'Last updated: 11/September/17 'Last update: new support for variance and variance + median modes, which are slightly slower but offer better quality @@ -536,8 +536,8 @@ Private Sub UpdateVarianceTrackers() End Sub -Friend Sub CopyStackToRGBQuad(ByRef dstArray() As RGBQUAD) - ReDim dstArray(0 To m_NumOfColors - 1) As RGBQUAD +Friend Sub CopyStackToRGBQuad(ByRef dstArray() As RGBQuad) + ReDim dstArray(0 To m_NumOfColors - 1) As RGBQuad Dim i As Long For i = 0 To m_NumOfColors - 1 dstArray(i).Red = m_Colors(i).Red diff --git a/Classes/pdMetadata.cls b/Classes/pdMetadata.cls index 03ff36ff55..3da2d30f30 100644 --- a/Classes/pdMetadata.cls +++ b/Classes/pdMetadata.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Image Metadata Handler -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 23/May/13 'Last updated: 09/June/16 'Last update: improve parsing behavior against incorrectly formed multiline print values that are non-binary in nature diff --git a/Classes/pdNoise.cls b/Classes/pdNoise.cls index 2f948ce4be..3180a21759 100644 --- a/Classes/pdNoise.cls +++ b/Classes/pdNoise.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Noise Generator -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 17/October/17 'Last updated: 17/October/17 'Last update: migrate noise-related functions from elsewhere in the project, add some new functions from diff --git a/Classes/pdObjectList.cls b/Classes/pdObjectList.cls index 0249c03aca..e7b25e8de8 100644 --- a/Classes/pdObjectList.cls +++ b/Classes/pdObjectList.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PD Object List Manager -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 18/August/17 'Last updated: 24/August/17 'Last update: finish work on automatic tab-order sorting diff --git a/Classes/pdOpenSaveDialog.cls b/Classes/pdOpenSaveDialog.cls index 9e4e3ec054..5fdcbe4ccb 100644 --- a/Classes/pdOpenSaveDialog.cls +++ b/Classes/pdOpenSaveDialog.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PD System Open/Save Dialog Interface -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 05/August/15 'Last updated: 15/August/15 'Last update: finish work on GetSaveFileName() diff --git a/Classes/pdPackager2.cls b/Classes/pdPackager2.cls index 5feacf362c..0b2fb50e8c 100644 --- a/Classes/pdPackager2.cls +++ b/Classes/pdPackager2.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon "pdPackage" v2.0 Interface (e.g. Zip-like archive handler) -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 05/April/14 'Last updated: 23/September/17 'Last update: revert to writing original, uncompressed data if compression doesn't reduce data size diff --git a/Classes/pdPackagerLegacy.cls b/Classes/pdPackagerLegacy.cls index 063027c103..1cb53362e4 100644 --- a/Classes/pdPackagerLegacy.cls +++ b/Classes/pdPackagerLegacy.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon "pdPackage" Interface (e.g. Zip-like archive handler) -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 05/April/14 'Last updated: 06/February/15 'Last update: expand zip-like interface, with help from the new pdFSO class diff --git a/Classes/pdParamXML.cls b/Classes/pdParamXML.cls index b9f0978451..6e6eede923 100644 --- a/Classes/pdParamXML.cls +++ b/Classes/pdParamXML.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Internal Parameter Handler v2 -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 25/March/13 'Last updated: 07/October/17 'Last update: switch to pdString, which greatly improves parameter assembly performance diff --git a/Classes/pdPixelBlender.cls b/Classes/pdPixelBlender.cls index aae338027c..439e39a28a 100644 --- a/Classes/pdPixelBlender.cls +++ b/Classes/pdPixelBlender.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Pixel Blender class -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 01/May/14 'Last updated: 04/June/17 'Last update: ongoing performance improvements @@ -209,7 +209,7 @@ Private Function CalculateDIBOverlap(ByRef topDIB As pdDIB, ByRef bottomDIB As p 'Start by finding the intersection between the top DIB rect and the bottom DIB rect. To ensure edges of subpixel positioning aren't missed, ' we use RECTFs for the check. - Dim topRect As RECTF, bottomRect As RECTF, IntersectRect As RECTF + Dim topRect As RectF, bottomRect As RectF, IntersectRect As RectF If (ptrToTopRectF = 0) Then With topRect @@ -286,7 +286,7 @@ Friend Sub ApplyMaskToTopDIB(ByRef dstDIB As pdDIB, ByRef maskDIB As pdDIB, Opti 'If a rect *is* provided, constrain our loop boundaries accordingly Else - Dim tmpRectF As RECTF + Dim tmpRectF As RectF CopyMemory ByVal VarPtr(tmpRectF), ByVal ptrToPaintbrushRectF, LenB(tmpRectF) initX = Int(tmpRectF.Left) * 4 initY = Int(tmpRectF.Top) @@ -314,11 +314,11 @@ Friend Sub ApplyMaskToTopDIB(ByRef dstDIB As pdDIB, ByRef maskDIB As pdDIB, Opti Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = maskDIB.GetDIBStride: topDIBPointer = maskDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, dstDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, maskDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -391,8 +391,8 @@ Private Sub PreProcessAlphaEffects(ByRef topDIB As pdDIB, ByRef bottomDIB As pdD Dim bottomA As Single, bottomAInt As Byte Dim bottomScanlineSize As Long, bottomDIBPointer As Long - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D + Dim topPixels() As Byte, topSA As SafeArray1D Dim topScanlineSize As Long, topDIBPointer As Long 'Blending requires a lot of int/float conversions. To speed things up, we'll use a persistent look-up table for converting @@ -483,7 +483,7 @@ Private Sub PreProcessAlphaEffects(ByRef topDIB As pdDIB, ByRef bottomDIB As pdD 'Locked alpha is a little weird, because we're copying out the alpha values of the *bottom* layer. Because the rect ' we've been passed is relative to the *top* layer, we need to calculate a transform now. If (ptrToTopLayerAlternateRectF <> 0#) Then - Dim tmpRectF As RECTF, tmpRectFSrc As RECTF + Dim tmpRectF As RectF, tmpRectFSrc As RectF CopyMemory ByVal VarPtr(tmpRectFSrc), ByVal ptrToTopLayerAlternateRectF, LenB(tmpRectF) With tmpRectF .Left = tmpRectFSrc.Left + xOffset @@ -602,7 +602,7 @@ Private Sub PostProcessAlphaEffects(ByRef topDIB As pdDIB, ByRef bottomDIB As pd 'Locked alpha is a little weird, because we're copying in the alpha values of the *bottom* layer. Because the rect ' we've been passed is relative to the *top* layer, we need to calculate a transform now. If (ptrToTopLayerAlternateRectF <> 0#) Then - Dim tmpRectF As RECTF, tmpRectFSrc As RECTF + Dim tmpRectF As RectF, tmpRectFSrc As RectF CopyMemory ByVal VarPtr(tmpRectFSrc), ByVal ptrToTopLayerAlternateRectF, LenB(tmpRectF) With tmpRectF .Left = tmpRectFSrc.Left + xOffset @@ -646,11 +646,11 @@ Private Sub ApplyBlendMode_Color(ByRef topDIB As pdDIB, ByRef bottomDIB As pdDIB Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -779,11 +779,11 @@ Private Sub ApplyBlendMode_ColorBurn(ByRef topDIB As pdDIB, ByRef bottomDIB As p Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -927,11 +927,11 @@ Private Sub ApplyBlendMode_ColorDodge(ByRef topDIB As pdDIB, ByRef bottomDIB As Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -1075,11 +1075,11 @@ Private Sub ApplyBlendMode_Darken(ByRef topDIB As pdDIB, ByRef bottomDIB As pdDI Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -1206,11 +1206,11 @@ Private Sub ApplyBlendMode_Difference(ByRef topDIB As pdDIB, ByRef bottomDIB As Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -1340,11 +1340,11 @@ Private Sub ApplyBlendMode_Divide(ByRef topDIB As pdDIB, ByRef bottomDIB As pdDI Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -1486,11 +1486,11 @@ Private Sub ApplyBlendMode_Erase(ByRef topDIB As pdDIB, ByRef bottomDIB As pdDIB Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -1591,11 +1591,11 @@ Private Sub ApplyBlendMode_Exclusion(ByRef topDIB As pdDIB, ByRef bottomDIB As p Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -1722,11 +1722,11 @@ Private Sub ApplyBlendMode_GrainExtract(ByRef topDIB As pdDIB, ByRef bottomDIB A Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -1868,11 +1868,11 @@ Private Sub ApplyBlendMode_GrainMerge(ByRef topDIB As pdDIB, ByRef bottomDIB As Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -2014,11 +2014,11 @@ Private Sub ApplyBlendMode_HardLight(ByRef topDIB As pdDIB, ByRef bottomDIB As p Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -2145,11 +2145,11 @@ Private Sub ApplyBlendMode_HardMix(ByRef topDIB As pdDIB, ByRef bottomDIB As pdD Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -2276,11 +2276,11 @@ Private Sub ApplyBlendMode_Hue(ByRef topDIB As pdDIB, ByRef bottomDIB As pdDIB, Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -2408,11 +2408,11 @@ Private Sub ApplyBlendMode_Lighten(ByRef topDIB As pdDIB, ByRef bottomDIB As pdD Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -2539,11 +2539,11 @@ Private Sub ApplyBlendMode_LinearBurn(ByRef topDIB As pdDIB, ByRef bottomDIB As Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -2673,11 +2673,11 @@ Private Sub ApplyBlendMode_LinearDodge(ByRef topDIB As pdDIB, ByRef bottomDIB As Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -2807,11 +2807,11 @@ Private Sub ApplyBlendMode_LinearLight(ByRef topDIB As pdDIB, ByRef bottomDIB As Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -2956,11 +2956,11 @@ Private Sub ApplyBlendMode_Luminosity(ByRef topDIB As pdDIB, ByRef bottomDIB As Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -3089,11 +3089,11 @@ Private Sub ApplyBlendMode_Multiply(ByRef topDIB As pdDIB, ByRef bottomDIB As pd Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -3220,11 +3220,11 @@ Private Sub ApplyBlendMode_Overlay(ByRef topDIB As pdDIB, ByRef bottomDIB As pdD Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -3351,11 +3351,11 @@ Private Sub ApplyBlendMode_PinLight(ByRef topDIB As pdDIB, ByRef bottomDIB As pd Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -3482,11 +3482,11 @@ Private Sub ApplyBlendMode_Saturation(ByRef topDIB As pdDIB, ByRef bottomDIB As Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -3614,11 +3614,11 @@ Private Sub ApplyBlendMode_Screen(ByRef topDIB As pdDIB, ByRef bottomDIB As pdDI Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -3750,11 +3750,11 @@ Private Sub ApplyBlendMode_SoftLight(ByRef topDIB As pdDIB, ByRef bottomDIB As p Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -3881,11 +3881,11 @@ Private Sub ApplyBlendMode_Subtract(ByRef topDIB As pdDIB, ByRef bottomDIB As pd Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -4015,11 +4015,11 @@ Private Sub ApplyBlendMode_VividLight(ByRef topDIB As pdDIB, ByRef bottomDIB As Dim topScanlineSize As Long, topDIBPointer As Long topScanlineSize = topDIB.GetDIBStride: topDIBPointer = topDIB.GetDIBPointer - Dim bottomPixels() As Byte, bottomSA As SAFEARRAY1D + Dim bottomPixels() As Byte, bottomSA As SafeArray1D PrepInternalSafeArray1D bottomSA, bottomDIB CopyMemory ByVal VarPtrArray(bottomPixels()), VarPtr(bottomSA), 4 - Dim topPixels() As Byte, topSA As SAFEARRAY1D + Dim topPixels() As Byte, topSA As SafeArray1D PrepInternalSafeArray1D topSA, topDIB CopyMemory ByVal VarPtrArray(topPixels()), VarPtr(topSA), 4 @@ -4137,7 +4137,7 @@ End Sub 'Given a 1D SafeArray struct and a target DIB, point the 1D array at the first scanline of the DIB, and initialize all relevant ' SafeArray parameters to match. -Private Sub PrepInternalSafeArray1D(ByRef dstSafeArray As SAFEARRAY1D, ByRef srcDIB As pdDIB) +Private Sub PrepInternalSafeArray1D(ByRef dstSafeArray As SafeArray1D, ByRef srcDIB As pdDIB) With dstSafeArray .cbElements = 1 diff --git a/Classes/pdPixelIterator.cls b/Classes/pdPixelIterator.cls index d172e764d2..f282bdb8ce 100644 --- a/Classes/pdPixelIterator.cls +++ b/Classes/pdPixelIterator.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Pixel Iterator class -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 04/December/14 'Last updated: 07/June/17 'Last update: add support for generic byte-array traversal @@ -64,15 +64,15 @@ Private m_YBTop As Long, m_YBBottom As Long, m_YBSize As Long Private m_DibPointer As Long, m_dibHeight As Long, m_dibStride As Long, m_dibColorDepth As Long, m_PixelWidth As Long 'Some functions may choose to use a byte array target instead of a DIB. That's fine! -Private m_BytesSA2D As SAFEARRAY2D, m_Bytes() As Byte -Private m_BytesSA1D As SAFEARRAY1D, m_ByteLine() As Byte +Private m_BytesSA2D As SafeArray2D, m_Bytes() As Byte +Private m_BytesSA1D As SafeArray1D, m_ByteLine() As Byte Private m_ByteArrayPtr As Long, m_ArrayWidth As Long, m_ArrayHeight As Long 'Pixel array (alias only; the actual pixel bits are stored by the caller, and treated as read-only by this class). ' In some situations it is advantageous to address the pixels using a 1D array, as VB is significantly slower when ' addressing 2D pixel positions. -Private m_PixelSA2D As SAFEARRAY2D, m_Pixels() As Byte -Private m_PixelSA1D As SAFEARRAY1D, m_PixelLine() As Byte +Private m_PixelSA2D As SafeArray2D, m_Pixels() As Byte +Private m_PixelSA1D As SafeArray1D, m_PixelLine() As Byte 'If the function wants alpha tracked, this will be set to TRUE. ' (NOTE: this tracker has been manually disabled, because no PD functions use it as present. Skipping it on inner @@ -88,12 +88,12 @@ Private m_LuminanceMode As PD_LUMINANCE_MODE 'Histogram arrays. Managing these are a bit tricky, because these are simply "trick" wrappers against arrays ' provided by the caller. -Private m_RedSA As SAFEARRAY1D, m_GreenSA As SAFEARRAY1D, m_BlueSA As SAFEARRAY1D, m_AlphaSA As SAFEARRAY1D +Private m_RedSA As SafeArray1D, m_GreenSA As SafeArray1D, m_BlueSA As SafeArray1D, m_AlphaSA As SafeArray1D Private m_Red() As Long, m_Green() As Long, m_Blue() As Long, m_Alpha() As Long 'Note that the caller can also use the pixel iterator in luminance mode. This relies on only a single destination ' luminance array, and dedicated movement/calculation functions are used. -Private m_LuminanceSA As SAFEARRAY1D +Private m_LuminanceSA As SafeArray1D Private m_Luminance() As Long 'Number of pixels in the histogram. This is required for things like median calculations. @@ -346,7 +346,7 @@ End Function 'Point an internal 1D array at some other 1D array. Any arrays aliased this way must be freed via Unalias1DArray, ' or VB will crash. -Private Sub Alias1DArray(ByRef orig1DArray() As Long, ByRef new1DArray() As Long, ByRef newArraySA As SAFEARRAY1D) +Private Sub Alias1DArray(ByRef orig1DArray() As Long, ByRef new1DArray() As Long, ByRef newArraySA As SafeArray1D) 'Retrieve a copy of the original 1D array's SafeArray struct Dim ptrSrc As Long diff --git a/Classes/pdPreferences.cls b/Classes/pdPreferences.cls index 67fe1e7481..a4039e738a 100644 --- a/Classes/pdPreferences.cls +++ b/Classes/pdPreferences.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Preferences Interface -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 03/November/12 'Last updated: 08/November/17 'Last update: remove potential duplicate README and LICENSE files after an in-place upgrade diff --git a/Classes/pdProfiler.cls b/Classes/pdProfiler.cls index d9964d2c02..2f7f1bfafd 100644 --- a/Classes/pdProfiler.cls +++ b/Classes/pdProfiler.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Performance Profiler - Long-term Tracking -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 19/June/14 'Last updated: 28/August/17 'Last update: code clean-up in preparation for splitting some functionality into a short-term class diff --git a/Classes/pdRandomize.cls b/Classes/pdRandomize.cls index b349f45a84..260f8f78af 100644 --- a/Classes/pdRandomize.cls +++ b/Classes/pdRandomize.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Random Number Generator -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 23/June/15 (but assembled from bits scattered throughout PD, many from years earlier) 'Last updated: 07/August/17 'Last update: add gaussian distribution functions, which use a Box-Muller transform to produce random diff --git a/Classes/pdRecentFiles.cls b/Classes/pdRecentFiles.cls index 3fc75d6623..f4924a3635 100644 --- a/Classes/pdRecentFiles.cls +++ b/Classes/pdRecentFiles.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'File > Open Recent List Manager -'Copyright 2005-2017 by Raj Chaudhuri and Tanner Helland +'Copyright 2005-2018 by Raj Chaudhuri and Tanner Helland 'Created: 16/February/15 'Last updated: 11/September/17 'Last update: Rewrote class from scratch as a standalone instance, to enable optimizations that aren't easily diff --git a/Classes/pdRedEye.cls b/Classes/pdRedEye.cls index 684139f5c8..d9d00916a1 100644 --- a/Classes/pdRedEye.cls +++ b/Classes/pdRedEye.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Red-eye Detection Engine -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 31/December/16 'Last updated: 06/January/16 'Last update: rework flood fill functionality into red-eye region detection @@ -39,12 +39,12 @@ Private Const INITIAL_STACK_HEIGHT As Long = 4096 'Red-eye detection requires two input arrays. In the first array, we will search already identified red-eye, ' eye-highlight, and non-skin pixels to determine potentially valid eye regions. This array must have already ' been filled by the user. -Private m_HighlightData() As Byte, m_HighlightSA As SAFEARRAY2D +Private m_HighlightData() As Byte, m_HighlightSA As SafeArray2D '...The second input array is of INTEGER type. It must be dimensioned to the size of the target image, and it will ' store unique region IDs for each pixel. Because there may be more than 255 unique regions, a byte array won't work. ' Pixels that do not belong to any regions are marked as 0. -Private m_RegionIDs() As Integer, m_RegionSA As SAFEARRAY2D +Private m_RegionIDs() As Integer, m_RegionSA As SafeArray2D 'Width and height of the target image. Private m_Width As Long, m_Height As Long diff --git a/Classes/pdResources.cls b/Classes/pdResources.cls index 9da92dadcc..7c9a8abca3 100644 --- a/Classes/pdResources.cls +++ b/Classes/pdResources.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Resource Manager -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 13/December/16 'Last updated: 11/August/17 'Last update: use class-level caches for loading resources, which should reduce memory churn diff --git a/Classes/pdSeamCarving.cls b/Classes/pdSeamCarving.cls index 872aaacffe..bfe68ecfc2 100644 --- a/Classes/pdSeamCarving.cls +++ b/Classes/pdSeamCarving.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Image seam carving (smart resize/"content-aware scale"/"liquid rescale") Engine -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 06/January/14 'Last updated: 29/July/14 'Last update: fixed some 32bpp issues, added serpentine scanning for ideal treatment of images on uniform backgrounds @@ -92,7 +92,7 @@ Public Sub SetEnergyImage(ByRef srcDIB As pdDIB) 'To speed up processing, we are going to store all energy data in the blue channel of the image. Dim energyData() As Byte - Dim energySA As SAFEARRAY2D + Dim energySA As SafeArray2D PrepSafeArray energySA, m_EnergyImage CopyMemory ByVal VarPtrArray(energyData()), VarPtr(energySA), 4 @@ -434,12 +434,12 @@ Private Function GrowVertically(ByRef seamMap() As Long, ByVal numOfAddedSeams A 'Obtain a pointer to the raw DIB bits of both the source and destination images Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D PrepSafeArray srcSA, m_SourceImage CopyMemory ByVal VarPtrArray(srcImageData()), VarPtr(srcSA), 4 Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D PrepSafeArray dstSA, tmpImage CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 @@ -816,12 +816,12 @@ Private Function GrowHorizontally(ByRef seamMap() As Long, ByVal numOfAddedSeams 'Obtain a pointer to the raw DIB bits of both the source and destination images Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D PrepSafeArray srcSA, m_SourceImage CopyMemory ByVal VarPtrArray(srcImageData()), VarPtr(srcSA), 4 Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D PrepSafeArray dstSA, tmpImage CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 diff --git a/Classes/pdSelection.cls b/Classes/pdSelection.cls index 1e22862736..b4c2d7ce54 100644 --- a/Classes/pdSelection.cls +++ b/Classes/pdSelection.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Selection class -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 25/September/12 'Last updated: 09/August/17 'Last update: tons of bug-fixes and performance improvements; still more work to do (as always), but this class is slowly stabilizing diff --git a/Classes/pdStream.cls b/Classes/pdStream.cls index 0b2c6af841..4457d0a64a 100644 --- a/Classes/pdStream.cls +++ b/Classes/pdStream.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Generic Stream-like I/O Interface -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 05/December/16 'Last updated: 25/October/17 'Last update: add "DeleteFromStart" function, as part of integration with our asynchronous ExifTool interface diff --git a/Classes/pdString.cls b/Classes/pdString.cls index 585de137d2..c5d4f56f3e 100644 --- a/Classes/pdString.cls +++ b/Classes/pdString.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon String Builder class -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 06/October/17 'Last updated: 06/October/17 'Last update: initial build diff --git a/Classes/pdStringStack.cls b/Classes/pdStringStack.cls index 192654d0ac..ff778951e9 100644 --- a/Classes/pdStringStack.cls +++ b/Classes/pdStringStack.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon "String Stack" Class -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 05/February/15 'Last updated: 30/August/15 'Last update: improve performance of stack resetting by only allocating new memory if absolutely necessary diff --git a/Classes/pdTextRenderer.cls b/Classes/pdTextRenderer.cls index efe9f225e3..a310a44207 100644 --- a/Classes/pdTextRenderer.cls +++ b/Classes/pdTextRenderer.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon GDI+ Text Manager and Renderer -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 22/April/15 'Last updated: 19/May/15 'Last update: various changes to improve compatibility with the new Uniscribe backend (see pdGlyphCollection) diff --git a/Classes/pdThemeColors.cls b/Classes/pdThemeColors.cls index 6605289ef2..951aa49dc2 100644 --- a/Classes/pdThemeColors.cls +++ b/Classes/pdThemeColors.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Visual Theme Color List class -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 15/January/16 'Last updated: 21/January/16 'Last update: continue fleshing out features diff --git a/Classes/pdTimer.cls b/Classes/pdTimer.cls index 76296710ca..ac962eca36 100644 --- a/Classes/pdTimer.cls +++ b/Classes/pdTimer.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Class-only Timer -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 07/February/16 'Last updated: 08/February/16 'Last update: added support for coalescing timers on Win 8+ diff --git a/Classes/pdToolPreset.cls b/Classes/pdToolPreset.cls index 25ecc1769e..293f8e1145 100644 --- a/Classes/pdToolPreset.cls +++ b/Classes/pdToolPreset.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Individual Tool Preset handler -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 14/August/13 'Last updated: 07/March/15 'Last update: split some parts of preset management out of the command bar and into this standalone class diff --git a/Classes/pdTranslate.cls b/Classes/pdTranslate.cls index dd9c2f81a6..938c77c705 100644 --- a/Classes/pdTranslate.cls +++ b/Classes/pdTranslate.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Central Language and Translation Handler -'Copyright 2012-2017 by Frank Donckers and Tanner Helland +'Copyright 2012-2018 by Frank Donckers and Tanner Helland 'Created: 21/December/12 'Last updated: 08/November/17 'Last update: perform some duplicate file clean-up when upgrading between versions diff --git a/Classes/pdUCEventSink.cls b/Classes/pdUCEventSink.cls index 0969a5ab95..3698d3d598 100644 --- a/Classes/pdUCEventSink.cls +++ b/Classes/pdUCEventSink.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Dummy event sink for PD's user control engine -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 13/October/16 'Last updated: 13/October/16 'Last update: initial build diff --git a/Classes/pdUCSupport.cls b/Classes/pdUCSupport.cls index 8f3ac6f5a7..6a079eca77 100644 --- a/Classes/pdUCSupport.cls +++ b/Classes/pdUCSupport.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Comprehensive User Control Support class -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 25/October/15 (but built from many parts existing earlier) 'Last updated: 25/January/16 'Last update: integrate proper theming support diff --git a/Classes/pdUndo.cls b/Classes/pdUndo.cls index aa20243165..d549e28df9 100644 --- a/Classes/pdUndo.cls +++ b/Classes/pdUndo.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Undo/Redo Handler -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 2/April/01 'Last updated: 12/September/17 'Last update: cache persistent file handles to the "master" Undo XML file (used by the Autosave engine to reconstruct diff --git a/Classes/pdUniscribe.cls b/Classes/pdUniscribe.cls index 74ecc7cdd3..75c4110e7b 100644 --- a/Classes/pdUniscribe.cls +++ b/Classes/pdUniscribe.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Uniscribe API Interface -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 14/May/15 'Last updated: 19/May/15 'Last update: migrate everything from a module to a class; there's enough useful code in here that we may want to @@ -57,7 +57,7 @@ Private Declare Function ScriptLayout Lib "usp10" (ByVal cRuns As Long, ByVal pt Private Declare Function ScriptPlace Lib "usp10" (ByVal srcDC As Long, ByRef psc As SCRIPT_CACHE, ByVal ptrToIntpwGlyphs As Long, ByVal cGlyphs As Long, ByVal ptrToSVpsva As Long, ByVal ptrTopsa As Long, ByVal ptrToLngpiAdvance As Long, ByVal ptrTopGoffset As Long, ByRef pABC As ABC) As Long Private Declare Function ScriptRecordDigitSubstitution Lib "usp10" (ByVal Locale As Long, psds As SCRIPT_DIGITSUBSTITUTE) As Long Private Declare Function ScriptShape Lib "usp10" (ByVal srcDC As Long, ByVal ptrToSCpsc As Long, ByVal pwcChars As Long, ByVal cChars As Long, ByVal cMaxGlyphs As Long, ByVal ptrToSApas As Long, ByVal ptrToIntpwOutGlyphs As Long, ByVal ptrToIntpwLogClust As Long, ByVal ptrToSVpsva As Long, ByRef pcGlyphs As Long) As Long -Private Declare Function ScriptTextOut Lib "usp10" (ByVal srcDC As Long, psc As SCRIPT_CACHE, ByVal x As Long, ByVal y As Long, ByVal fuOptions As Long, lprc As RECTL, psa As SCRIPT_ANALYSIS, ByVal pwcReserved As Long, ByVal iReserved As Long, pwGlyphs() As Integer, ByVal cGlyphs As Long, piAdvance() As Long, piJustify As Any, pGoffset As GOFFSET) As Long +Private Declare Function ScriptTextOut Lib "usp10" (ByVal srcDC As Long, psc As SCRIPT_CACHE, ByVal x As Long, ByVal y As Long, ByVal fuOptions As Long, lprc As RectL, psa As SCRIPT_ANALYSIS, ByVal pwcReserved As Long, ByVal iReserved As Long, pwGlyphs() As Integer, ByVal cGlyphs As Long, piAdvance() As Long, piJustify As Any, pGoffset As GOFFSET) As Long Private Declare Function ScriptXtoCP Lib "usp10" (ByVal iX As Long, ByVal cChars As Long, ByVal cGlyphs As Long, pwLogClust() As Integer, psva As SCRIPT_VISATTR, piAdvance() As Long, psa As SCRIPT_ANALYSIS, piCP As Long, piTrailing As Long) As Long 'Some Uniscribe features weren't added until Vista; these enable all kinds of neat behavior, but we must call them conditionally diff --git a/Classes/pdUniscribeItem.cls b/Classes/pdUniscribeItem.cls index 4c82f314c9..1fd632487e 100644 --- a/Classes/pdUniscribeItem.cls +++ b/Classes/pdUniscribeItem.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Uniscribe Item Container -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 20/May/15 'Last updated: 20/May/15 'Last update: start migrating run-specific information into this class, to make it easier to handle complicated text layouts. diff --git a/Classes/pdViewport.cls b/Classes/pdViewport.cls index 197a57cac4..20d6f32ed7 100644 --- a/Classes/pdViewport.cls +++ b/Classes/pdViewport.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Image Viewport Support Class -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 15/April/01 'Last updated: 13/September/15 'Last update: overhaul the class completely as part of prepping for paint tools @@ -40,88 +40,88 @@ Option Explicit 'As of version 7.0, the first stage of the viewport pipeline uses RectF structs to store the calculated ' coordinate regions. See the ViewportEngine module for more details on how these structs are used. -Private m_ImageRect_CanvasCoords As RECTF -Private m_ImageRect_TranslatedCanvasCoords As RECTF -Private m_CanvasRect_ImageCoords As RECTF -Private m_CanvasRect_ActualPixels As RECTF +Private m_ImageRect_CanvasCoords As RectF +Private m_ImageRect_TranslatedCanvasCoords As RectF +Private m_CanvasRect_ImageCoords As RectF +Private m_CanvasRect_ActualPixels As RectF 'The area of the canvas covered by the image is stored here. Note that a separate boolean is also stored, ' on the off chance that the canvas and image do not currently intersect. Private m_CanvasAndImageIntersect As Boolean -Private m_CanvasImageIntersectRect As RECTF -Private m_SrcImageIntersectRect As RECTF +Private m_CanvasImageIntersectRect As RectF +Private m_SrcImageIntersectRect As RectF 'Current scroll bar values. These are saved/restored when the active image changes. -Private m_hScrollValue As Long, m_vScrollValue As Long +Private m_HScrollValue As Long, m_VScrollValue As Long Public Sub SetHScrollValue(ByVal newValue As Long) - m_hScrollValue = newValue + m_HScrollValue = newValue End Sub Public Sub SetVScrollValue(ByVal newValue As Long) - m_vScrollValue = newValue + m_VScrollValue = newValue End Sub Friend Sub SetIntersectState(ByRef newState As Boolean) m_CanvasAndImageIntersect = newState End Sub -Friend Sub SetIntersectRectCanvas(ByRef srcRectF As RECTF) +Friend Sub SetIntersectRectCanvas(ByRef srcRectF As RectF) m_CanvasImageIntersectRect = srcRectF End Sub -Friend Sub SetIntersectRectImage(ByRef srcRectF As RECTF) +Friend Sub SetIntersectRectImage(ByRef srcRectF As RectF) m_SrcImageIntersectRect = srcRectF End Sub -Friend Sub SetImageRectCanvasCoords(ByRef srcRectF As RECTF) +Friend Sub SetImageRectCanvasCoords(ByRef srcRectF As RectF) m_ImageRect_CanvasCoords = srcRectF End Sub -Friend Sub SetImageRectTranslated(ByRef srcRectF As RECTF) +Friend Sub SetImageRectTranslated(ByRef srcRectF As RectF) m_ImageRect_TranslatedCanvasCoords = srcRectF End Sub -Friend Sub SetCanvasRectImageCoords(ByRef srcRectF As RECTF) +Friend Sub SetCanvasRectImageCoords(ByRef srcRectF As RectF) m_CanvasRect_ImageCoords = srcRectF End Sub -Friend Sub SetCanvasRectActualPixels(ByRef srcRectF As RECTF) +Friend Sub SetCanvasRectActualPixels(ByRef srcRectF As RectF) m_CanvasRect_ActualPixels = srcRectF End Sub Public Function GetHScrollValue() As Long - GetHScrollValue = m_hScrollValue + GetHScrollValue = m_HScrollValue End Function Public Function GetVScrollValue() As Long - GetVScrollValue = m_vScrollValue + GetVScrollValue = m_VScrollValue End Function Friend Function GetIntersectState() As Boolean GetIntersectState = m_CanvasAndImageIntersect End Function -Friend Sub GetIntersectRectCanvas(ByRef dstRectF As RECTF) +Friend Sub GetIntersectRectCanvas(ByRef dstRectF As RectF) dstRectF = m_CanvasImageIntersectRect End Sub -Friend Sub GetIntersectRectImage(ByRef dstRectF As RECTF) +Friend Sub GetIntersectRectImage(ByRef dstRectF As RectF) dstRectF = m_SrcImageIntersectRect End Sub -Friend Sub GetImageRectCanvasCoords(ByRef dstRectF As RECTF) +Friend Sub GetImageRectCanvasCoords(ByRef dstRectF As RectF) dstRectF = m_ImageRect_CanvasCoords End Sub -Friend Sub GetImageRectTranslated(ByRef dstRectF As RECTF) +Friend Sub GetImageRectTranslated(ByRef dstRectF As RectF) dstRectF = m_ImageRect_TranslatedCanvasCoords End Sub -Friend Sub GetCanvasRectImageCoords(ByRef dstRectF As RECTF) +Friend Sub GetCanvasRectImageCoords(ByRef dstRectF As RectF) dstRectF = m_CanvasRect_ImageCoords End Sub -Friend Sub GetCanvasRectActualPixels(ByRef dstRectF As RECTF) +Friend Sub GetCanvasRectActualPixels(ByRef dstRectF As RectF) dstRectF = m_CanvasRect_ActualPixels End Sub diff --git a/Classes/pdVisualThemes.cls b/Classes/pdVisualThemes.cls index 6e7a8e1ab8..1ba50773f2 100644 --- a/Classes/pdVisualThemes.cls +++ b/Classes/pdVisualThemes.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Visual Theming class -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 23/October/13 'Last updated: 11/February/17 'Last update: add many new theme accent color options diff --git a/Classes/pdVoronoi.cls b/Classes/pdVoronoi.cls index 01a6fdd753..3aab34059b 100644 --- a/Classes/pdVoronoi.cls +++ b/Classes/pdVoronoi.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Voronoi class -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 14/July/14 'Last updated: 08/August/17 'Last update: minor code cleanup diff --git a/Classes/pdWindowManager.cls b/Classes/pdWindowManager.cls index 7ec8a41d4a..20a8998dc5 100644 --- a/Classes/pdWindowManager.cls +++ b/Classes/pdWindowManager.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Window Manager class -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 02/October/13 'Last updated: 06/February/17 'Last update: another large-scale code purge as I migrate everything to safer subclassing techniques diff --git a/Classes/pdWindowPainter.cls b/Classes/pdWindowPainter.cls index 017d3ffb45..b380f5bf6c 100644 --- a/Classes/pdWindowPainter.cls +++ b/Classes/pdWindowPainter.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Flicker-Free Window Painter class -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 20/October/14 (but built from many parts existing earlier) 'Last updated: 06/February/17 'Last update: migrate to safer subclassing technique @@ -49,13 +49,13 @@ Public Event EraseBkgnd() 'Subclassing is used to better optimize the control's painting; this also requires manual validation of the control rect. Private Const WM_PAINT As Long = &HF Private Const WM_ERASEBKGND As Long = &H14 -Private Declare Function ValidateRect Lib "user32" (ByVal targetHwnd As Long, ByRef lpRect As RECT) As Long -Private Declare Function InvalidateRect Lib "user32" (ByVal targetHwnd As Long, ByRef lpRect As RECT, ByVal bErase As Long) As Long -Private Declare Function GetClientRect Lib "user32" (ByVal targetHwnd As Long, ByRef lpRect As RECT) As Long -Private Declare Function EndPaint Lib "user32" (ByVal targetHwnd As Long, ByRef lpPaint As PAINTSTRUCT) As Long -Private Declare Function BeginPaint Lib "user32" (ByVal targetHwnd As Long, ByRef lpPaint As PAINTSTRUCT) As Long -Private Declare Function GetUpdateRect Lib "user32" (ByVal targetHwnd As Long, ByRef lpRect As RECT, ByVal bErase As Long) As Long -Private Declare Function UpdateWindow Lib "user32" (ByVal targetHwnd As Long) As Long +Private Declare Function ValidateRect Lib "user32" (ByVal targetHWnd As Long, ByRef lpRect As RECT) As Long +Private Declare Function InvalidateRect Lib "user32" (ByVal targetHWnd As Long, ByRef lpRect As RECT, ByVal bErase As Long) As Long +Private Declare Function GetClientRect Lib "user32" (ByVal targetHWnd As Long, ByRef lpRect As RECT) As Long +Private Declare Function EndPaint Lib "user32" (ByVal targetHWnd As Long, ByRef lpPaint As PAINTSTRUCT) As Long +Private Declare Function BeginPaint Lib "user32" (ByVal targetHWnd As Long, ByRef lpPaint As PAINTSTRUCT) As Long +Private Declare Function GetUpdateRect Lib "user32" (ByVal targetHWnd As Long, ByRef lpRect As RECT, ByVal bErase As Long) As Long +Private Declare Function UpdateWindow Lib "user32" (ByVal targetHWnd As Long) As Long 'The window being subclassed Private m_hWnd As Long diff --git a/Classes/pdWindowSize.cls b/Classes/pdWindowSize.cls index 77d3860ecb..40bfb4437a 100644 --- a/Classes/pdWindowSize.cls +++ b/Classes/pdWindowSize.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon DPI-Aware Window Resize class -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 23/September/15 (but built from many parts existing earlier) 'Last updated: 06/February/17 'Last update: migrate to safer subclassing technique @@ -51,8 +51,8 @@ Private Enum SWP_FLAGS End Enum Private Declare Function GetWindowRect Lib "user32" (ByVal hndWindow As Long, ByRef lpRect As winRect) As Long -Private Declare Sub SetWindowPos Lib "user32" (ByVal targetHwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) -Private Declare Function GetParent Lib "user32" (ByVal targetHwnd As Long) As Long +Private Declare Sub SetWindowPos Lib "user32" (ByVal targetHWnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) +Private Declare Function GetParent Lib "user32" (ByVal targetHWnd As Long) As Long Private Declare Function ClientToScreen Lib "user32" (ByVal srcHwnd As Long, ByRef lpPoint As POINTAPI) As Long Private Declare Function ScreenToClient Lib "user32" (ByVal srcHwnd As Long, ByRef lpPoint As POINTAPI) As Long Private Declare Function MapWindowPoints Lib "user32" (ByVal hWndFrom As Long, ByVal hWndTo As Long, ByRef lpPoints As POINTAPI, ByVal cPoints As Long) As Long diff --git a/Classes/pdWindowSync.cls b/Classes/pdWindowSync.cls index 0af794f209..55cb5583ea 100644 --- a/Classes/pdWindowSync.cls +++ b/Classes/pdWindowSync.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Window Synchronization class -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 26/September/15 'Last updated: 06/February/16 'Last update: migrate to safer subclassing technique @@ -40,7 +40,7 @@ Option Explicit Implements ISubclass Private Declare Function GetClientRect Lib "user32" (ByVal hndWindow As Long, ByRef lpRect As winRect) As Long -Private Declare Sub SetWindowPos Lib "user32" (ByVal targetHwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) +Private Declare Sub SetWindowPos Lib "user32" (ByVal targetHWnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long 'SetWindowPos flags diff --git a/Classes/pdXML.cls b/Classes/pdXML.cls index 2f878349a6..a954ab4943 100644 --- a/Classes/pdXML.cls +++ b/Classes/pdXML.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon XML Interface (reading, writing, parsing, etc) -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 30/July/13 'Last updated: 18/August/14 'Last update: make the text comparison mode user-settable; some PD-centric XML files adhere to strict formatting, diff --git a/Classes/pdZoom.cls b/Classes/pdZoom.cls index 8916d26df9..17a7a3c300 100644 --- a/Classes/pdZoom.cls +++ b/Classes/pdZoom.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Zoom Handler - calculates and tracks zoom values for a given image -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 4/15/01 'Last updated: 28/August/17 'Last update: code clean-up and minor optimizations diff --git a/Controls/pdAccelerator.ctl b/Controls/pdAccelerator.ctl index 2203d6c1de..f9ccfcffdb 100644 --- a/Controls/pdAccelerator.ctl +++ b/Controls/pdAccelerator.ctl @@ -31,7 +31,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Accelerator ("Hotkey") handler -'Copyright 2013-2017 by Tanner Helland and contributors +'Copyright 2013-2018 by Tanner Helland and contributors 'Created: 06/November/15 (formally split off from a heavily modified vbaIHookControl by Steve McMahon 'Last updated: 08/December/17 'Last update by: jpbro (https://github.com/jpbro) diff --git a/Controls/pdBrushSelector.ctl b/Controls/pdBrushSelector.ctl index dc0b1fb03f..51272f71cd 100644 --- a/Controls/pdBrushSelector.ctl +++ b/Controls/pdBrushSelector.ctl @@ -31,7 +31,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Brush Selector custom control -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 30/June/15 'Last updated: 01/February/16 'Last update: finalize theming support diff --git a/Controls/pdButton.ctl b/Controls/pdButton.ctl index 01aa7d23f9..846f0fff56 100644 --- a/Controls/pdButton.ctl +++ b/Controls/pdButton.ctl @@ -30,7 +30,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Generic Button control -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 19/October/14 'Last updated: 31/August/15 'Last update: split off from pdButtonToolbox. The two controls are similar, but this one needs to manage a caption. diff --git a/Controls/pdButtonStrip.ctl b/Controls/pdButtonStrip.ctl index b92ddf7f29..d2a8632497 100644 --- a/Controls/pdButtonStrip.ctl +++ b/Controls/pdButtonStrip.ctl @@ -28,7 +28,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon "Button Strip" control -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 13/September/14 'Last updated: 23/January/16 'Last update: add caption support; large overhaul of rendering logic to better work with dark themes diff --git a/Controls/pdButtonStripVertical.ctl b/Controls/pdButtonStripVertical.ctl index a007e91e1f..5620d01c92 100644 --- a/Controls/pdButtonStripVertical.ctl +++ b/Controls/pdButtonStripVertical.ctl @@ -28,7 +28,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon "Button Strip Vertical" control -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 15/March/15 'Last updated: 25/January/16 'Last update: mirror latest changes from the horizontal button strip update diff --git a/Controls/pdButtonToolbox.ctl b/Controls/pdButtonToolbox.ctl index b7c24db5e3..10cec508ee 100644 --- a/Controls/pdButtonToolbox.ctl +++ b/Controls/pdButtonToolbox.ctl @@ -32,7 +32,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Toolbox Button control -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 19/October/14 'Last updated: 14/February/16 'Last update: finalize theming support diff --git a/Controls/pdCanvas.ctl b/Controls/pdCanvas.ctl index c81dee3440..0b23b747fd 100644 --- a/Controls/pdCanvas.ctl +++ b/Controls/pdCanvas.ctl @@ -154,7 +154,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Canvas User Control (previously a standalone form) -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: 29/November/02 'Last updated: 05/March/16 'Last update: finish integrating the image strip control as a canvas element diff --git a/Controls/pdCanvasView.ctl b/Controls/pdCanvasView.ctl index e25ad6cfc9..3e6fe155d8 100644 --- a/Controls/pdCanvasView.ctl +++ b/Controls/pdCanvasView.ctl @@ -29,7 +29,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon "CanvasView" User Control (e.g. the primary component of pdCanvas) -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: 29/November/02 'Last updated: 16/February/16 'Last update: migrate the main view portions of pdCanvas into this control, which will greatly simplify paint tool integration diff --git a/Controls/pdCheckBox.ctl b/Controls/pdCheckBox.ctl index 49ed549faf..0d27265d4e 100644 --- a/Controls/pdCheckBox.ctl +++ b/Controls/pdCheckBox.ctl @@ -30,7 +30,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Checkbox control -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 28/January/13 'Last updated: 15/February/16 'Last update: finalize theming support diff --git a/Controls/pdColorDepth.ctl b/Controls/pdColorDepth.ctl index 880594096d..368099ca08 100644 --- a/Controls/pdColorDepth.ctl +++ b/Controls/pdColorDepth.ctl @@ -122,7 +122,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Color/Transparency depth selector User Control -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 22/April/16 'Last updated: 19/January/17 'Last update: migrate copy+paste implementation to dedicated UC diff --git a/Controls/pdColorSelector.ctl b/Controls/pdColorSelector.ctl index 263d8bcb23..67c7ff2fb0 100644 --- a/Controls/pdColorSelector.ctl +++ b/Controls/pdColorSelector.ctl @@ -32,7 +32,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Color Selector custom control -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 17/August/13 'Last updated: 28/October/15 'Last update: finish integration with pdUCSupport, which let us cut a ton of redundant code diff --git a/Controls/pdColorVariants.ctl b/Controls/pdColorVariants.ctl index 6340d9b277..3a086d3526 100644 --- a/Controls/pdColorVariants.ctl +++ b/Controls/pdColorVariants.ctl @@ -29,7 +29,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon "Color Variants" color selector -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 22/October/15 'Last updated: 23/October/15 'Last update: switch to a pure path-based system for rendering and hit-detection @@ -475,8 +475,8 @@ Private Sub CreateSubregions_Rectangular(ByVal ucLeft As Long, ByVal ucTop As Lo 'For this control layout, we are going to use a temporary rect collection to define the position of all color variants. ' This simplifies things a bit, and when we're done, we'll simply copy all rects into the master pd2DPath array. - Dim colorRects() As RECTF - ReDim colorRects(0 To NUM_OF_VARIANTS - 1) As RECTF + Dim colorRects() As RectF + ReDim colorRects(0 To NUM_OF_VARIANTS - 1) As RectF 'Start by calculating the primary color rect. It is the focus of the control, and its position affects all ' subsequent controls. diff --git a/Controls/pdColorWheel.ctl b/Controls/pdColorWheel.ctl index d84cd45b83..0bd2f94ea8 100644 --- a/Controls/pdColorWheel.ctl +++ b/Controls/pdColorWheel.ctl @@ -29,7 +29,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon "Color Wheel" color selector -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 19/October/15 'Last updated: 15/February/16 'Last update: implement theming and a few new features @@ -80,7 +80,7 @@ Private m_HueRadiusInner As Single, m_HueRadiusOuter As Single 'Various saturation + value box positioning values. These are calculated by the CreateSVSquare function and cached here, as a ' convenience for subsequent hit-testing and rendering. -Private m_SVRectF As RECTF +Private m_SVRectF As RectF 'Current control HSV values, on the range [0, 1]. Make sure to update these if a new color is supplied externally. Private m_Hue As Double, m_Saturation As Double, m_Value As Double @@ -578,7 +578,7 @@ Private Sub CreateColorWheel() 'With our "alpha guidance" pixels drawn, we can now loop through the image, rendering actual hue colors as we go. ' For convenience, we will place hue 0 at angle 0. Dim hPixels() As Byte - Dim hueSA As SAFEARRAY2D + Dim hueSA As SafeArray2D PrepSafeArray hueSA, m_WheelBuffer CopyMemory ByVal VarPtrArray(hPixels()), VarPtr(hueSA), 4 @@ -687,7 +687,7 @@ Private Sub CreateSVSquare() ' - The y-axis position determines value (1 -> 0) ' - The x-axis position determines saturation (1 -> 0) Dim svPixels() As Byte - Dim svSA As SAFEARRAY2D + Dim svSA As SafeArray2D PrepSafeArray svSA, m_SquareBuffer CopyMemory ByVal VarPtrArray(svPixels()), VarPtr(svSA), 4 diff --git a/Controls/pdCommandBar.ctl b/Controls/pdCommandBar.ctl index 6dda214fed..fdf5477f26 100644 --- a/Controls/pdCommandBar.ctl +++ b/Controls/pdCommandBar.ctl @@ -98,7 +98,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Tool Dialog Command Bar custom control -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 14/August/13 'Last updated: 23/August/17 'Last update: add automatic handling for Enter/Esc keypresses from child controls diff --git a/Controls/pdCommandBarMini.ctl b/Controls/pdCommandBarMini.ctl index 2173231ae4..6110b07f23 100644 --- a/Controls/pdCommandBarMini.ctl +++ b/Controls/pdCommandBarMini.ctl @@ -50,7 +50,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon "Mini" Command Bar control -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 14/August/13 'Last updated: 23/August/17 'Last update: add automatic handling for Enter/Esc keypresses from child controls diff --git a/Controls/pdContainer.ctl b/Controls/pdContainer.ctl index 5636fee725..f36f64ada4 100644 --- a/Controls/pdContainer.ctl +++ b/Controls/pdContainer.ctl @@ -31,7 +31,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Generic Control Container -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 13/June/16 'Last updated: 18/February/17 'Last update: report size changes back to our parent window diff --git a/Controls/pdDownload.ctl b/Controls/pdDownload.ctl index 2fac6e4146..82d18ddc27 100644 --- a/Controls/pdDownload.ctl +++ b/Controls/pdDownload.ctl @@ -31,7 +31,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Asynchronous Download control -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 24/January/15 'Last updated: 26/January/15 'Last update: wrapped up initial build @@ -149,6 +149,7 @@ Private m_ResetActive As Boolean 'Canceled downloads are released using a failsafe timer; this prevents issues where internal functions are working with ' an array that a pending Reset command is attempting to erase. Private WithEvents m_ResetTimer As pdTimer +Attribute m_ResetTimer.VB_VarHelpID = -1 Public Function GetControlType() As PD_ControlType GetControlType = pdct_Download diff --git a/Controls/pdDropDown.ctl b/Controls/pdDropDown.ctl index edd2ec84fb..b8f8867f96 100644 --- a/Controls/pdDropDown.ctl +++ b/Controls/pdDropDown.ctl @@ -40,7 +40,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Drop Down control 2.0 -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 24/February/16 'Last updated: 09/February/17 'Last update: migrate to safer comctl32 subclassing technique diff --git a/Controls/pdDropDownFont.ctl b/Controls/pdDropDownFont.ctl index 65e6393781..3830a97784 100644 --- a/Controls/pdDropDownFont.ctl +++ b/Controls/pdDropDownFont.ctl @@ -40,7 +40,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Font-specific Drop Down control 2.0 -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 01/June/16 'Last updated: 09/February/17 'Last update: migrate to safer comctl32 subclassing technique @@ -65,7 +65,7 @@ Public Event LostFocusAPI() 'Positioning the dynamically raised listview window is a bit hairy; we use APIs so we can position things correctly ' in the screen's coordinate space (even on high-DPI displays) -Private Declare Function GetWindowRect Lib "user32" (ByVal srcHwnd As Long, ByRef dstRectL As RECTL) As Boolean +Private Declare Function GetWindowRect Lib "user32" (ByVal srcHwnd As Long, ByRef dstRectL As RectL) As Boolean Private Declare Function GetParent Lib "user32" (ByVal targetHWnd As Long) As Long Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long @@ -113,7 +113,7 @@ Private Const COMBO_PADDING_VERTICAL As Single = 2# Private Const NUM_ITEMS_VISIBLE As Long = 10 'The rectangle where the combo portion of the control is actually rendered -Private m_ComboRect As RECTF, m_MouseInComboRect As Boolean +Private m_ComboRect As RectF, m_MouseInComboRect As Boolean 'When the control receives focus via keyboard (e.g. NOT by mouse events), we draw a focus rect to help orient the user. Private m_FocusRectActive As Boolean @@ -462,7 +462,7 @@ Private Sub lbPrimary_DrawListEntry(ByVal bufferDC As Long, ByVal itemIndex As L itemFontColor = m_Colors.RetrieveColor(PDDD_ListCaption, Me.Enabled, itemIsSelected, itemIsHovered) 'Grab the rendering rect - Dim tmpRectF As RECTF + Dim tmpRectF As RectF CopyMemory ByVal VarPtr(tmpRectF), ByVal ptrToRectF, 16& 'Paint the fill and border @@ -774,13 +774,13 @@ Private Sub RaiseListBox() 'We first want to retrieve this control instance's window coordinates *in the screen's coordinate space*. ' (We need this to know how to position the listbox element.) - Dim myRect As RECTL + Dim myRect As RectL GetWindowRect Me.hWnd, myRect 'We now want to figure out the idealized coordinates for the pop-up rect. I prefer an OSX / Windows 10 approach to ' positioning, where the currently selected item (.ListIndex) is positioned directly over the underlying combo box, ' with neighboring entries positioned above and/or below, as relevant. - Dim popupRect As RECTF, topOfListIndex As Single + Dim popupRect As RectF, topOfListIndex As Single 'To construct this rect, we start by calculating the position of the .ListIndex item itself With popupRect @@ -1124,7 +1124,7 @@ Private Sub RedrawBackBuffer(Optional ByVal redrawImmediately As Boolean = False GDI_Plus.GDIPlusDrawRectFOutlineToDC bufferDC, m_ComboRect, ddColorBorder, 255, borderWidth, False, GP_LJ_Miter 'Next, the right-aligned arrow. (We need its measurements to know where to restrict the caption's length.) - Dim buttonPt1 As POINTFLOAT, buttonPt2 As POINTFLOAT, buttonPt3 As POINTFLOAT + Dim buttonPt1 As PointFloat, buttonPt2 As PointFloat, buttonPt3 As PointFloat buttonPt1.x = m_ComboRect.Left + m_ComboRect.Width - FixDPIFloat(16) buttonPt1.y = m_ComboRect.Top + (m_ComboRect.Height / 2) - FixDPIFloat(1) diff --git a/Controls/pdFxPreview.ctl b/Controls/pdFxPreview.ctl index b46118616e..2e6829d1bf 100644 --- a/Controls/pdFxPreview.ctl +++ b/Controls/pdFxPreview.ctl @@ -58,7 +58,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Effect Preview custom control -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 10/January/13 'Last updated: 13/February/16 'Last update: migrate large portions of the control into a separate pdPreview control diff --git a/Controls/pdGradientSelector.ctl b/Controls/pdGradientSelector.ctl index 77b34dd1cc..0a5689d2ba 100644 --- a/Controls/pdGradientSelector.ctl +++ b/Controls/pdGradientSelector.ctl @@ -29,7 +29,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Gradient Selector custom control -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 23/July/15 'Last updated: 01/February/16 'Last update: finalize theming support @@ -68,7 +68,7 @@ Private m_Brush As pd2DBrush Private isDialogLive As Boolean 'The rectangle where the gradient preview is actually rendered, and a boolean to track whether the mouse is inside that rect -Private m_GradientRect As RECTF, m_MouseInsideGradientRect As Boolean, m_MouseDownGradientRect As Boolean +Private m_GradientRect As RectF, m_MouseInsideGradientRect As Boolean, m_MouseDownGradientRect As Boolean 'User control support class. Historically, many classes (and associated subclassers) were required by each user control, ' but I've since attempted to wrap these into a single master control support class. diff --git a/Controls/pdHistory.ctl b/Controls/pdHistory.ctl index e85fe8b8c8..b88c006b52 100644 --- a/Controls/pdHistory.ctl +++ b/Controls/pdHistory.ctl @@ -29,7 +29,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Automatic History control -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 16/October/16 'Last updated: 27/October/16 'Last update: add "rows" property, which allows for cramming more history blocks into a small space @@ -61,11 +61,11 @@ Public Event LostFocusAPI() 'To simplify rendering, we pre-calculate a rectangle for the "history" area of the control. (Individual items ' within the history control can be resolved on-the-fly). This rect is calculated by UpdateControlLayout, ' and it must be recalculated if the control size changes. -Private m_HistoryRect As RECTF +Private m_HistoryRect As RectF Private Type PD_HistoryItem ItemString As String - ItemRect As RECTF + ItemRect As RectF End Type Private m_HistoryItems() As PD_HistoryItem @@ -621,7 +621,7 @@ Private Sub RedrawBackBuffer(Optional ByVal paintImmediately As Boolean = False) 'Because this control is owner-drawn, our owner is responsible for drawing the individual history samples. If (m_HistoryCount > 0) Then - Dim tmpRectF As RECTF + Dim tmpRectF As RectF For i = 0 To m_HistoryCount - 1 diff --git a/Controls/pdHyperlink.ctl b/Controls/pdHyperlink.ctl index b94699f9c5..c452a8c0fb 100644 --- a/Controls/pdHyperlink.ctl +++ b/Controls/pdHyperlink.ctl @@ -29,7 +29,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Unicode Hyperlink (clickable label) control -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 28/October/14 'Last updated: 18/April/16 'Last update: fix double-painting issue on MouseLeave events @@ -490,7 +490,7 @@ Private Sub UpdateControlLayout() ' Right-aligned labels in particular must have their .Left property modified, any time the .Width property is modified. ' To facilitate this behavior, we'll store the original label's width and height; this will let us know how far we ' need to move the label, if any. - Dim controlRect As RECTL, controlWidth As Long, controlHeight As Long + Dim controlRect As RectL, controlWidth As Long, controlHeight As Long ucSupport.GetControlRect controlRect controlWidth = controlRect.Right - controlRect.Left controlHeight = controlRect.Bottom - controlRect.Top diff --git a/Controls/pdImageStrip.ctl b/Controls/pdImageStrip.ctl index f729ac75cf..bfa4d3c296 100644 --- a/Controls/pdImageStrip.ctl +++ b/Controls/pdImageStrip.ctl @@ -31,7 +31,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Image Strip control (e.g. a scrollable line of image thumbnails) -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 15/October/13 'Last updated: 05/January/17 'Last update: delay resource loading until absolutely required @@ -1107,7 +1107,7 @@ Private Sub RedrawBackBuffer() End If 'Render each thumbnail block - Dim thumbRect As RECTF + Dim thumbRect As RectF thumbRect.Width = m_ThumbWidth thumbRect.Height = m_ThumbHeight @@ -1159,7 +1159,7 @@ Private Sub RedrawBackBuffer() End Sub 'Render a given thumbnail onto the background form at the specified offset -Private Sub RenderThumbTab(ByVal targetDC As Long, ByVal thumbIndex As Long, ByRef thumbRectF As RECTF) +Private Sub RenderThumbTab(ByVal targetDC As Long, ByVal thumbIndex As Long, ByRef thumbRectF As RectF) Dim isSelected As Boolean, isHovered As Boolean, isEnabled As Boolean isSelected = (thumbIndex = m_CurrentThumb) diff --git a/Controls/pdLabel.ctl b/Controls/pdLabel.ctl index 2273ef209f..0d9e2c8b55 100644 --- a/Controls/pdLabel.ctl +++ b/Controls/pdLabel.ctl @@ -29,7 +29,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Unicode Label control -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 28/October/14 'Last updated: 02/November/15 'Last update: convert to ucSupport. This control was a messy one, but it has the most to gain from program-level @@ -406,7 +406,7 @@ Private Sub UpdateControlLayout() ' Right-aligned labels in particular must have their .Left property modified, any time the .Width property is modified. ' To facilitate this behavior, we'll store the original label's width and height; this will let us know how far we ' need to move the label, if any. - Dim controlRect As RECTL, controlWidth As Long, controlHeight As Long + Dim controlRect As RectL, controlWidth As Long, controlHeight As Long ucSupport.GetControlRect controlRect controlWidth = controlRect.Right - controlRect.Left controlHeight = controlRect.Bottom - controlRect.Top diff --git a/Controls/pdLayerList.ctl b/Controls/pdLayerList.ctl index a722e3cb7b..b7f0d5d3d4 100644 --- a/Controls/pdLayerList.ctl +++ b/Controls/pdLayerList.ctl @@ -48,7 +48,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Layer List control -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 18/September/15 'Last updated: 18/September/15 'Last update: wrap the pdLayerListInner object with this control diff --git a/Controls/pdLayerListInner.ctl b/Controls/pdLayerListInner.ctl index b87ef8b6a0..888614061c 100644 --- a/Controls/pdLayerListInner.ctl +++ b/Controls/pdLayerListInner.ctl @@ -40,7 +40,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Layer Listbox (inner portion only) -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 25/March/14 'Last updated: 11/September/16 'Last update: isolate the old layer toolbox code inside its own control. This greatly simplifies theming, @@ -78,7 +78,7 @@ Public Event GotFocusAPI() Public Event LostFocusAPI() 'The rectangle where the list is actually rendered -Private m_ListRect As RECTF +Private m_ListRect As RectF '2D painting support classes Private m_Painter As pd2DPainter @@ -998,7 +998,7 @@ Private Sub RedrawBackBuffer() 'To simplify drawing, convert the current block area into a rect; we'll use this for subsequent ' layout decisions. - Dim blockRect As RECTF + Dim blockRect As RectF With blockRect .Left = offsetX .Top = offsetY diff --git a/Controls/pdListBox.ctl b/Controls/pdListBox.ctl index 9e0af070ab..d4427544fa 100644 --- a/Controls/pdListBox.ctl +++ b/Controls/pdListBox.ctl @@ -48,7 +48,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon List Box control -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 22/December/15 'Last updated: 28/December/15 'Last update: continued work on initial build @@ -80,7 +80,7 @@ Attribute ucSupport.VB_VarHelpID = -1 'Because this control supports captions, the main interaction area (list + scrollbar) may be shifted slightly downward. ' The usable space of both objects is defined by this rect. -Private m_InteractiveRect As RECTF +Private m_InteractiveRect As RectF 'Local list of themable colors. This list includes all potential colors used by this class, regardless of state change ' or internal control settings. The list is updated by calling the UpdateColorList function. diff --git a/Controls/pdListBoxOD.ctl b/Controls/pdListBoxOD.ctl index 5f3f51176f..6cb38f88bf 100644 --- a/Controls/pdListBoxOD.ctl +++ b/Controls/pdListBoxOD.ctl @@ -48,7 +48,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Owner-Drawn List Box control -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 26/March/16 'Last updated: 27/March/16 'Last update: continued migrating code from the default list box to this instance @@ -83,7 +83,7 @@ Attribute ucSupport.VB_VarHelpID = -1 'Because this control supports captions, the main interaction area (list + scrollbar) may be shifted slightly downward. ' The usable space of both objects is defined by this rect. -Private m_InteractiveRect As RECTF +Private m_InteractiveRect As RectF 'Local list of themable colors. This list includes all potential colors used by this class, regardless of state change ' or internal control settings. The list is updated by calling the UpdateColorList function. diff --git a/Controls/pdListBoxView.ctl b/Controls/pdListBoxView.ctl index 5f93726c7d..fb63e30d11 100644 --- a/Controls/pdListBoxView.ctl +++ b/Controls/pdListBoxView.ctl @@ -29,7 +29,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon List Box View control (e.g. the list part of a list box, not including the scroll bar) -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 22/December/15 'Last updated: 18/February/16 'Last update: continued work on initial build @@ -67,7 +67,7 @@ Private Const LIST_PADDING_HORIZONTAL As Single = 4# Private Const LIST_PADDING_VERTICAL As Single = 2# 'The rectangle where the list is actually rendered -Private m_ListRect As RECTF +Private m_ListRect As RectF 'List box support class. Handles data storage and coordinate math for rendering. Private WithEvents listSupport As pdListSupport @@ -490,7 +490,7 @@ Private Sub RedrawBackBuffer(Optional ByVal forciblyRedrawScreen As Boolean = Fa Dim tmpTop As Long, tmpHeight As Long, tmpHeightWithoutSeparator As Long Dim lineY As Single - Dim tmpListItem As PD_LISTITEM, tmpRect As RECTF + Dim tmpListItem As PD_LISTITEM, tmpRect As RectF 'Left and Width are the same for all list entries If listHasFocus Then diff --git a/Controls/pdListBoxViewOD.ctl b/Controls/pdListBoxViewOD.ctl index 9c29f41944..1d89de5852 100644 --- a/Controls/pdListBoxViewOD.ctl +++ b/Controls/pdListBoxViewOD.ctl @@ -29,7 +29,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Owner-Drawn List Box View control (e.g. the list part of a list box, not including the scroll bar) -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 26/March/16 'Last updated: 04/January/17 'Last update: added support for a "borderless" rendering mode @@ -68,7 +68,7 @@ Public Event LostFocusAPI() Private m_ListItemHeight As Long 'The rectangle where the list is actually rendered, and a boolean to track whether the mouse is inside that rect -Private m_ListRect As RECTF +Private m_ListRect As RectF 'List box support class. Handles data storage and coordinate math for rendering. Private WithEvents listSupport As pdListSupport @@ -490,7 +490,7 @@ Private Sub RedrawBackBuffer(Optional ByVal forciblyRedrawScreen As Boolean = Fa Dim itemIsSelected As Boolean, itemIsHovered As Boolean, itemHasSeparator As Boolean Dim tmpTop As Long, tmpHeight As Long, tmpHeightWithoutSeparator As Long Dim lineY As Single - Dim tmpListItem As PD_LISTITEM, tmpRect As RECTF + Dim tmpListItem As PD_LISTITEM, tmpRect As RectF Dim i As Long For i = firstItemIndex To lastItemIndex diff --git a/Controls/pdMetadataExport.ctl b/Controls/pdMetadataExport.ctl index 42037a215d..f250c446d4 100644 --- a/Controls/pdMetadataExport.ctl +++ b/Controls/pdMetadataExport.ctl @@ -105,7 +105,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Metadata Export control group -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 18/March/16 'Last updated: 13/June/16 'Last update: minor code clean-up diff --git a/Controls/pdNavigator.ctl b/Controls/pdNavigator.ctl index 302f2f23cb..3b60bb8ca1 100644 --- a/Controls/pdNavigator.ctl +++ b/Controls/pdNavigator.ctl @@ -37,7 +37,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Navigation custom control -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 16/October/15 'Last updated: 17/October/15 'Last update: wrap up initial build diff --git a/Controls/pdNavigatorInner.ctl b/Controls/pdNavigatorInner.ctl index b7805bae47..f989cc9857 100644 --- a/Controls/pdNavigatorInner.ctl +++ b/Controls/pdNavigatorInner.ctl @@ -29,7 +29,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Navigation custom control (inner panel) -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 16/October/15 'Last updated: 16/February/16 'Last update: migrate portions of the navigator control into this standalone inner panel; this frees us up to add @@ -72,7 +72,7 @@ Private Const THUMB_PADDING As Long = 3 Private m_ThumbEventX As Single, m_ThumbEventY As Single 'The rect where the image thumbnail has been drawn. This is calculated by the RedrawBackBuffer function. -Private m_ThumbRect As RECTF, m_ImageRegion As RECTF +Private m_ThumbRect As RectF, m_ImageRegion As RectF 'Last mouse (x, y) values. We track these so we know whether to highlight the region box inside the navigator. Private m_LastMouseX As Single, m_LastMouseY As Single @@ -363,7 +363,7 @@ Private Sub RedrawBackBuffer() 'Query the active image for a copy of the intersection rect of the viewport, and the image itself, ' in image coordinate space - Dim viewportRect As RECTF + Dim viewportRect As RectF pdImages(g_CurrentImage).ImgViewport.GetIntersectRectImage viewportRect 'We now want to convert the viewport rect into our little navigator coordinate space. Start by converting the @@ -374,7 +374,7 @@ Private Sub RedrawBackBuffer() widthDivisor = 1# / pdImages(g_CurrentImage).Width heightDivisor = 1# / pdImages(g_CurrentImage).Height - Dim relativeRect As RECTF + Dim relativeRect As RectF With relativeRect .Left = viewportRect.Left * widthDivisor .Top = viewportRect.Top * heightDivisor diff --git a/Controls/pdNewOld.ctl b/Controls/pdNewOld.ctl index 9671d52a0f..798eca1c2c 100644 --- a/Controls/pdNewOld.ctl +++ b/Controls/pdNewOld.ctl @@ -29,7 +29,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon New/Old comparison control -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 14/October/16 'Last updated: 14/October/16 'Last update: initial build @@ -61,8 +61,8 @@ Public Event LostFocusAPI() ' control size or current language changes (as the new translations may be longer/shorter). Private m_FontSize As Single Private m_NewCaptionTranslated As String, m_OldCaptionTranslated As String -Private m_NewCaptionPt As POINTFLOAT, m_OldCaptionPt As POINTFLOAT -Private m_NewItemRect As RECTF, m_OldItemRect As RECTF +Private m_NewCaptionPt As PointFloat, m_OldCaptionPt As PointFloat +Private m_NewItemRect As RectF, m_OldItemRect As RectF 'The only hoverable item in this control is the "old" item rect Private m_OldItemIsHovered As Boolean @@ -303,7 +303,7 @@ Private Sub UpdateControlLayout() 'Next, we need to calculate the size of the "new" and "old" captions. We want to align these within the ' same column, so we need to know which is larger (in terms of pixels). - Dim newCaptionRect As RECTF, oldCaptionRect As RECTF + Dim newCaptionRect As RectF, oldCaptionRect As RectF Dim tmpFont As pdFont Set tmpFont = Fonts.GetMatchingUIFont(Me.FontSize) diff --git a/Controls/pdPenSelector.ctl b/Controls/pdPenSelector.ctl index a7c2ecf163..7b8e829d99 100644 --- a/Controls/pdPenSelector.ctl +++ b/Controls/pdPenSelector.ctl @@ -30,7 +30,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Pen Selector custom control -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 04/July/15 'Last updated: 20/June/16 'Last update: migrate to pd2D for all UI rendering @@ -69,7 +69,7 @@ Private m_PreviewPath As pd2DPath Private m_IsDialogLive As Boolean 'The rectangle where the pen preview is actually rendered, and a boolean to track whether the mouse is inside that rect -Private m_PenRect As RECTF, m_MouseInsidePenRect As Boolean, m_MouseDownPenRect As Boolean +Private m_PenRect As RectF, m_MouseInsidePenRect As Boolean, m_MouseDownPenRect As Boolean '2D painting support classes Private m_Painter As pd2DPainter diff --git a/Controls/pdPreview.ctl b/Controls/pdPreview.ctl index d064113014..33b773dc58 100644 --- a/Controls/pdPreview.ctl +++ b/Controls/pdPreview.ctl @@ -28,7 +28,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Image Preview custom control -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 10/January/13 'Last updated: 13/February/16 'Last update: migrated large portions of the fxPreview control into this new pdPreview control; this allows for diff --git a/Controls/pdRadioButton.ctl b/Controls/pdRadioButton.ctl index 77503c7a46..8e3d28b7bd 100644 --- a/Controls/pdRadioButton.ctl +++ b/Controls/pdRadioButton.ctl @@ -33,7 +33,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Radio Button control -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 28/January/13 'Last updated: 15/February/16 'Last update: finalize theming support @@ -79,15 +79,15 @@ Private m_Value As Boolean 'Rect where the caption is rendered. This is calculated by UpdateControlLayout, and it needs to be revisited if the ' caption changes, or the control size changes. -Private m_CaptionRect As RECTF +Private m_CaptionRect As RectF 'Similar rect for the radio button itself -Private m_RadioButtonRect As RECTF +Private m_RadioButtonRect As RectF 'Whenever the caption changes or the control is resized, the "clickable" rect must be updated. (This control allows the user ' to click on either the radio button, or the caption itself.) It's tracked separately, because there's some fairly messy ' padding calculations involved in positioning the radio button and caption relative to the control as a whole. -Private m_ClickableRect As RECTF, m_MouseInsideClickableRect As Boolean +Private m_ClickableRect As RectF, m_MouseInsideClickableRect As Boolean 'User control support class. Historically, many classes (and associated subclassers) were required by each user control, ' but I've since attempted to wrap these into a single master control support class. diff --git a/Controls/pdResize.ctl b/Controls/pdResize.ctl index 89e795a89b..e729257f0f 100644 --- a/Controls/pdResize.ctl +++ b/Controls/pdResize.ctl @@ -199,7 +199,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'Image Resize User Control -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 6/12/01 (original resize dialog), 24/Jan/14 (conversion to user control) 'Last updated: 24/May/16 'Last update: implement .Reset functionality for the spinner controls diff --git a/Controls/pdScrollBar.ctl b/Controls/pdScrollBar.ctl index 44ce6fc2e5..140d5b7353 100644 --- a/Controls/pdScrollBar.ctl +++ b/Controls/pdScrollBar.ctl @@ -76,7 +76,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Scrollbar control -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 07/October/15 'Last updated: 11/October/15 'Last update: wrap up initial build @@ -136,11 +136,11 @@ Private m_SignificantDigits As Long 'To simplify mouse_down handling, resize events fill three rects: one for the "up" or "left" scroll button, one for ' the "down" or "right" scroll button, and a third one, for the track rect between the buttons. -Private upLeftRect As RECTL, downRightRect As RECTL, trackRect As RECTL +Private upLeftRect As RectL, downRightRect As RectL, trackRect As RectL 'Max/min property changes fill a third rect - the "thumb" rect - which is the bar in the middle of the scroll bar. ' Note that the thumb rect is a RECTF, because it supports subpixel positioning. -Private thumbRect As RECTF +Private thumbRect As RectF 'To simplify thumb calculations, we calculate its size only when necessary, and cache it. Note that the size ' is directionless (e.g. it represents the height for a vertical Thumb, and the width for a horizontal one). @@ -1046,7 +1046,7 @@ Private Sub RedrawBackBuffer(Optional ByVal redrawImmediately As Boolean = False End If 'Finally, paint the arrows themselves - Dim buttonPt1 As POINTFLOAT, buttonPt2 As POINTFLOAT, buttonPt3 As POINTFLOAT + Dim buttonPt1 As PointFloat, buttonPt2 As PointFloat, buttonPt3 As PointFloat 'Start with the up/left arrow If m_OrientationHorizontal Then diff --git a/Controls/pdSlider.ctl b/Controls/pdSlider.ctl index 033215b082..28d03a066f 100644 --- a/Controls/pdSlider.ctl +++ b/Controls/pdSlider.ctl @@ -48,7 +48,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Slider+Spinner custom control -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 19/April/13 'Last updated: 06/November/17 'Last update: add a FinalChange event, which gives us some breathing room on energy intensive canvas instances diff --git a/Controls/pdSliderStandalone.ctl b/Controls/pdSliderStandalone.ctl index b188dda961..6b678baee6 100644 --- a/Controls/pdSliderStandalone.ctl +++ b/Controls/pdSliderStandalone.ctl @@ -30,7 +30,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon standalone slider custom control -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 19/April/13 'Last updated: 19/May/16 'Last update: migrate to new pd2D painting classes diff --git a/Controls/pdSpinner.ctl b/Controls/pdSpinner.ctl index 12a396aa07..98b850d7e5 100644 --- a/Controls/pdSpinner.ctl +++ b/Controls/pdSpinner.ctl @@ -28,7 +28,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Spinner (formerly Text+UpDown) custom control -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 19/April/13 'Last updated: 27/February/17 'Last update: extend "significant digits" property to support any arbitrary precision diff --git a/Controls/pdStatusBar.ctl b/Controls/pdStatusBar.ctl index ac5f87fe3b..1cb199cc30 100644 --- a/Controls/pdStatusBar.ctl +++ b/Controls/pdStatusBar.ctl @@ -138,7 +138,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon primary canvas status bar control -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: 29/November/02 'Last updated: 03/March/16 'Last update: migrate status bar into its own dedicated control diff --git a/Controls/pdStrip.ctl b/Controls/pdStrip.ctl index 9a210b11a0..38742cb3f0 100644 --- a/Controls/pdStrip.ctl +++ b/Controls/pdStrip.ctl @@ -29,7 +29,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Owner-Drawn Strip control -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 13/February/17 'Last updated: 13/February/17 'Last update: initial build (split off from the original pdButtonStrip control) diff --git a/Controls/pdTextBox.ctl b/Controls/pdTextBox.ctl index 4f12dfdf2f..25adde9f07 100644 --- a/Controls/pdTextBox.ctl +++ b/Controls/pdTextBox.ctl @@ -29,7 +29,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Unicode Text Box control -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 03/November/14 'Last updated: 09/February/16 'Last update: move all API edit control code out of this class, and into a dedicated pdEditBoxW class. This greatly diff --git a/Controls/pdTitle.ctl b/Controls/pdTitle.ctl index fc78a52d5b..f15837c87e 100644 --- a/Controls/pdTitle.ctl +++ b/Controls/pdTitle.ctl @@ -29,7 +29,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Collapsible Title Label+Button control -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 19/October/14 'Last updated: 12/February/16 'Last update: integrate with pdUCSupport, which cuts a ton of redundant code diff --git a/Forms/Adjustments_BlackAndWhite.frm b/Forms/Adjustments_BlackAndWhite.frm index aac61a8c1d..0285a564f1 100644 --- a/Forms/Adjustments_BlackAndWhite.frm +++ b/Forms/Adjustments_BlackAndWhite.frm @@ -129,7 +129,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Monochrome Conversion Form -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: some time 2002 'Last updated: 07/June/16 'Last update: add option for stripping transparency from the image @@ -243,7 +243,7 @@ Private Function CalculateOptimalThreshold() As Long 'Create a local array and point it at the pixel data of the image Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 @@ -335,7 +335,7 @@ Public Sub MasterBlackWhiteConversion(ByVal monochromeParams As String, Optional 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D 'If the user wants transparency removed from the image, apply that change prior to monochrome conversion Dim alphaAlreadyPremultiplied As Boolean: alphaAlreadyPremultiplied = False diff --git a/Forms/Adjustments_BrightnessContrast.frm b/Forms/Adjustments_BrightnessContrast.frm index 5454dce14b..2edd9f99a4 100644 --- a/Forms/Adjustments_BrightnessContrast.frm +++ b/Forms/Adjustments_BrightnessContrast.frm @@ -94,7 +94,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Brightness and Contrast Handler -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 2/6/01 'Last updated: 09/June/16 'Last update: total overhaul; the old code was stupid and slow, and an option is now provided for a modern diff --git a/Forms/Adjustments_Channel_ChannelMixer.frm b/Forms/Adjustments_Channel_ChannelMixer.frm index 921a9cd78c..699fdea5f6 100644 --- a/Forms/Adjustments_Channel_ChannelMixer.frm +++ b/Forms/Adjustments_Channel_ChannelMixer.frm @@ -159,7 +159,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Channel Mixer Form -'Copyright 2013-2017 by Tanner Helland, first build Copyright 2014 Audioglider +'Copyright 2013-2018 by Tanner Helland, first build Copyright 2014 Audioglider 'Created: 08/June/13 'Last updated: 23/September/14 'Last update: rework the interface a bit; add a button strip, increase white space, improve title labels @@ -314,7 +314,7 @@ Public Sub ApplyChannelMixer(ByVal channelMixerParams As String, Optional ByVal 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 @@ -447,7 +447,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() UpdateStoredValues - Process "Channel mixer", , GetLocalParamString(), UNDO_LAYER + Process "Channel mixer", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RandomizeClick() diff --git a/Forms/Adjustments_Channel_Rechannel.frm b/Forms/Adjustments_Channel_Rechannel.frm index e93f89ee64..f997ea1670 100644 --- a/Forms/Adjustments_Channel_Rechannel.frm +++ b/Forms/Adjustments_Channel_Rechannel.frm @@ -105,7 +105,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Rechannel Interface -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: original rechannel algorithm - sometimes 2001, this form 28/September/12 'Last updated: 04/December/15 'Last update: overhaul interface, switch to new XML parameter class @@ -211,7 +211,7 @@ Public Sub RechannelImage(ByVal parameterList As String, Optional ByVal toPrevie 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 diff --git a/Forms/Adjustments_ColorBalance.frm b/Forms/Adjustments_ColorBalance.frm index be2dff6c4d..ec526e5e78 100644 --- a/Forms/Adjustments_ColorBalance.frm +++ b/Forms/Adjustments_ColorBalance.frm @@ -178,7 +178,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Color Balance Adjustment Form -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 31/January/13 'Last updated: 02/August/17 'Last update: revert changes from an outside contributor that may have carried licensing issues @@ -234,7 +234,7 @@ Public Sub ApplyColorBalance(ByVal effectParams As String, Optional ByVal toPrev 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D, tmpSA1D As SAFEARRAY1D + Dim tmpSA As SafeArray2D, tmpSA1D As SafeArray1D EffectPrep.PrepImageData tmpSA, toPreview, dstPic 'Local loop variables can be more efficiently cached by VB's compiler, so we transfer all relevant loop data here @@ -351,7 +351,7 @@ Private Sub chkLuminance_Click() End Sub Private Sub cmdBar_OKClick() - Process "Color balance", , GetLocalParamString(), UNDO_LAYER + Process "Color balance", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Adjustments_Color_Colorize.frm b/Forms/Adjustments_Color_Colorize.frm index cb8e5ff130..98726bbb7b 100644 --- a/Forms/Adjustments_Color_Colorize.frm +++ b/Forms/Adjustments_Color_Colorize.frm @@ -75,7 +75,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Colorize Form -'Copyright 2006-2017 by Tanner Helland +'Copyright 2006-2018 by Tanner Helland 'Created: 12/January/07 'Last updated: 22/June/14 'Last update: replace old scroll bar with slider/text combo @@ -91,7 +91,7 @@ Attribute VB_Exposed = False Option Explicit Private Sub cmdBar_OKClick() - Process "Colorize", , GetLocalParamString(), UNDO_LAYER + Process "Colorize", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() @@ -122,7 +122,7 @@ Public Sub ColorizeImage(ByVal effectParams As String, Optional ByVal toPreview 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 diff --git a/Forms/Adjustments_Color_Grayscale.frm b/Forms/Adjustments_Color_Grayscale.frm index c47743a0ad..3cec48c991 100644 --- a/Forms/Adjustments_Color_Grayscale.frm +++ b/Forms/Adjustments_Color_Grayscale.frm @@ -106,7 +106,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Grayscale Conversion Handler -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: 1/12/02 'Last updated: 20/July/17 'Last update: migrate to XML params, simplify a bunch of code @@ -164,7 +164,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Black and white", False, GetLocalParamString(), UNDO_LAYER + Process "Black and white", False, GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() @@ -201,7 +201,7 @@ Public Sub MasterGrayscaleFunction(ByVal effectParams As String, Optional ByVal End With 'Create a working copy of the relevant pixel data (with all selection transforms applied) - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'Based on the options the user has provided, figure out a maximum progress bar value. This changes depending on: @@ -265,7 +265,7 @@ Public Function fGrayscaleCustom(ByVal numOfShades As Long, ByRef srcDIB As pdDI 'Point an array at the source DIB's image data Dim imageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D PrepSafeArray srcSA, srcDIB CopyMemory ByVal VarPtrArray(imageData()), VarPtr(srcSA), 4 @@ -353,7 +353,7 @@ Public Function fGrayscaleCustomDither(ByVal numOfShades As Long, ByVal DitherMe 'Point an array at the source DIB's image data Dim imageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D PrepSafeArray srcSA, srcDIB CopyMemory ByVal VarPtrArray(imageData()), VarPtr(srcSA), 4 @@ -715,7 +715,7 @@ Public Function MenuGrayscaleAverage(ByRef srcDIB As pdDIB, Optional ByVal suppr 'Point an array at the source DIB's image data Dim imageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D PrepSafeArray srcSA, srcDIB CopyMemory ByVal VarPtrArray(imageData()), VarPtr(srcSA), 4 @@ -792,7 +792,7 @@ Public Function MenuGrayscale(ByRef srcDIB As pdDIB, Optional ByVal suppressMess 'Point an array at the source DIB's image data Dim imageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D PrepSafeArray srcSA, srcDIB CopyMemory ByVal VarPtrArray(imageData()), VarPtr(srcSA), 4 @@ -864,7 +864,7 @@ Public Function MenuDesaturate(ByRef srcDIB As pdDIB, Optional ByVal suppressMes 'Point an array at the source DIB's image data Dim imageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D PrepSafeArray srcSA, srcDIB CopyMemory ByVal VarPtrArray(imageData()), VarPtr(srcSA), 4 @@ -935,7 +935,7 @@ Public Function MenuDecompose(ByVal maxOrMin As Long, ByRef srcDIB As pdDIB, Opt 'Point an array at the source DIB's image data Dim imageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D PrepSafeArray srcSA, srcDIB CopyMemory ByVal VarPtrArray(imageData()), VarPtr(srcSA), 4 @@ -1006,7 +1006,7 @@ Public Function MenuGrayscaleSingleChannel(ByVal cChannel As Long, ByRef srcDIB 'Point an array at the source DIB's image data Dim imageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D PrepSafeArray srcSA, srcDIB CopyMemory ByVal VarPtrArray(imageData()), VarPtr(srcSA), 4 diff --git a/Forms/Adjustments_Color_HSL.frm b/Forms/Adjustments_Color_HSL.frm index 0c0c37c790..c473ed00ac 100644 --- a/Forms/Adjustments_Color_HSL.frm +++ b/Forms/Adjustments_Color_HSL.frm @@ -89,7 +89,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'HSL Adjustment Form -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 05/October/12 'Last updated: 20/July/17 'Last update: migrate to XML params, minor performance improvements @@ -129,7 +129,7 @@ Public Sub AdjustImageHSL(ByVal effectParams As String, Optional ByVal toPreview 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 diff --git a/Forms/Adjustments_Color_ReplaceColor.frm b/Forms/Adjustments_Color_ReplaceColor.frm index 204d99c4b2..5340b87f2f 100644 --- a/Forms/Adjustments_Color_ReplaceColor.frm +++ b/Forms/Adjustments_Color_ReplaceColor.frm @@ -99,7 +99,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Replace color dialog -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 29/October/13 'Last updated: 11/June/16 'Last update: add a LittleCMS path for the algorithm; this improves performance by ~30% diff --git a/Forms/Adjustments_Color_Temperature.frm b/Forms/Adjustments_Color_Temperature.frm index 2aeb23f222..946cf68bb8 100644 --- a/Forms/Adjustments_Color_Temperature.frm +++ b/Forms/Adjustments_Color_Temperature.frm @@ -181,7 +181,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Color Temperature Adjustment Form -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 16/September/12 'Last updated: 10/September/16 'Last update: total overhaul. Among other things, a new "basic" temperature adjustment method is available, and the "advanced" @@ -245,7 +245,7 @@ Public Sub ApplyTemperatureToImage(ByVal parameterList As String, Optional ByVal 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 @@ -362,7 +362,7 @@ Private Sub btsMethod_Click(ByVal buttonIndex As Long) End Sub Private Sub cmdBar_OKClick() - Process "Temperature", , GetLocalParamString(), UNDO_LAYER + Process "Temperature", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Adjustments_Color_Tint.frm b/Forms/Adjustments_Color_Tint.frm index 112a698e2d..959e7509a1 100644 --- a/Forms/Adjustments_Color_Tint.frm +++ b/Forms/Adjustments_Color_Tint.frm @@ -67,7 +67,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Tint Dialog -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 03/July/14 'Last updated: 20/July/17 'Last update: migrate to XML params @@ -103,7 +103,7 @@ Public Sub AdjustTint(ByVal effectParams As String, Optional ByVal toPreview As 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 @@ -181,7 +181,7 @@ Public Sub AdjustTint(ByVal effectParams As String, Optional ByVal toPreview As End Sub Private Sub cmdBar_OKClick() - Process "Tint", , GetLocalParamString(), UNDO_LAYER + Process "Tint", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Adjustments_Color_Vibrance.frm b/Forms/Adjustments_Color_Vibrance.frm index c40d3f20dc..22dcbe51ec 100644 --- a/Forms/Adjustments_Color_Vibrance.frm +++ b/Forms/Adjustments_Color_Vibrance.frm @@ -62,7 +62,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Vibrance Adjustment Tool -'Copyright 2014-2017 by Tanner Helland, first build Copyright 2013 Audioglider +'Copyright 2014-2018 by Tanner Helland, first build Copyright 2013 Audioglider 'Created: 26/June/13 'Last updated: 02/August/17 'Last update: rewrite against entirely new, improved algorithm @@ -104,7 +104,7 @@ Public Sub Vibrance(ByVal effectParams As String, Optional ByVal toPreview As Bo 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D, tmpSA1D As SAFEARRAY1D + Dim tmpSA As SafeArray2D, tmpSA1D As SafeArray1D EffectPrep.PrepImageData tmpSA, toPreview, dstPic 'Local loop variables can be more efficiently cached by VB's compiler, so we transfer all relevant loop data here @@ -134,8 +134,8 @@ Public Sub Vibrance(ByVal effectParams As String, Optional ByVal toPreview As Bo 'If (vibranceAdjustment <> 0#) Then vibranceAdjustment = 1# / vibranceAdjustment 'Construct a curve-based lookup table - Dim sCurve() As POINTFLOAT - ReDim sCurve(0 To 2) As POINTFLOAT + Dim sCurve() As PointFloat + ReDim sCurve(0 To 2) As PointFloat sCurve(0).x = 0 sCurve(0).y = 0 sCurve(2).x = 255 diff --git a/Forms/Adjustments_Curves.frm b/Forms/Adjustments_Curves.frm index 02bfff5557..9e31c7489a 100644 --- a/Forms/Adjustments_Curves.frm +++ b/Forms/Adjustments_Curves.frm @@ -147,7 +147,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image Curves Adjustment Dialog -'Copyright 2008-2017 by Tanner Helland +'Copyright 2008-2018 by Tanner Helland 'Created: sometime 2008 'Last updated: 19/July/17 'Last update: rewrite against XML params, performance optimizations diff --git a/Forms/Adjustments_Histogram_DisplayHistogram.frm b/Forms/Adjustments_Histogram_DisplayHistogram.frm index b55be07728..8b88f1a89c 100644 --- a/Forms/Adjustments_Histogram_DisplayHistogram.frm +++ b/Forms/Adjustments_Histogram_DisplayHistogram.frm @@ -344,7 +344,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Histogram Handler -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 6/12/01 'Last updated: 30/September/13 'Last update: when drawing cubic spline histograms, cache various GDI+ handles to improve performance. @@ -898,7 +898,7 @@ Public Sub StretchHistogram() 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 diff --git a/Forms/Adjustments_Histogram_Equalize.frm b/Forms/Adjustments_Histogram_Equalize.frm index 5a081ebed0..41ac6b8d03 100644 --- a/Forms/Adjustments_Histogram_Equalize.frm +++ b/Forms/Adjustments_Histogram_Equalize.frm @@ -95,7 +95,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Histogram Equalization Interface -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 19/September/12 'Last updated: 16/December/15 'Last update: overhaul from the ground up so we can support local histogram operations, multiple luminance types, @@ -128,7 +128,7 @@ Public Sub EqualizeHistogram(ByVal parameterList As String, Optional ByVal toPre 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 diff --git a/Forms/Adjustments_Levels.frm b/Forms/Adjustments_Levels.frm index a0f5cef1b7..8fe9d64bfc 100644 --- a/Forms/Adjustments_Levels.frm +++ b/Forms/Adjustments_Levels.frm @@ -261,7 +261,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image Levels -'Copyright 2006-2017 by Tanner Helland +'Copyright 2006-2018 by Tanner Helland 'Created: 22/July/06 'Last updated: 19/July/17 'Last update: rewrite against XML param strings @@ -378,7 +378,7 @@ Public Function GetIdealLevelParamString(ByRef srcDIB As pdDIB) As String 'Create a local array and point it at the source DIB's pixel data Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D PrepSafeArray tmpSA, srcDIB CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 @@ -625,7 +625,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Levels", , GetLevelsParamString(), UNDO_LAYER + Process "Levels", , GetLevelsParamString(), UNDO_Layer End Sub 'Randomize button (command bar) @@ -1155,7 +1155,7 @@ Private Sub Form_Load() 'Render sample gradients for input/output levels Dim cSurface As pd2DSurface, cBrush As pd2DBrush, cPainter As pd2DPainter - Dim boundsRectF As RECTF + Dim boundsRectF As RectF With boundsRectF .Left = 0 .Top = 0 @@ -1188,7 +1188,7 @@ Public Sub MapImageLevels(ByRef listOfLevels As String, Optional ByVal toPreview 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 diff --git a/Forms/Adjustments_Lighting_Exposure.frm b/Forms/Adjustments_Lighting_Exposure.frm index 2b0e927b54..1c43542b70 100644 --- a/Forms/Adjustments_Lighting_Exposure.frm +++ b/Forms/Adjustments_Lighting_Exposure.frm @@ -120,7 +120,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Exposure Dialog -'Copyright 2013-2017 by Tanner Helland, first build Copyright 2013 Audioglider +'Copyright 2013-2018 by Tanner Helland, first build Copyright 2013 Audioglider 'Created: 13/July/13 'Last updated: 20/July/17 'Last update: migrate to XML params, minor optimizations @@ -169,7 +169,7 @@ Public Sub Exposure(ByVal effectParams As String, Optional ByVal toPreview As Bo 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 diff --git a/Forms/Adjustments_Lighting_Gamma.frm b/Forms/Adjustments_Lighting_Gamma.frm index a4a96817f0..d593f7a46b 100644 --- a/Forms/Adjustments_Lighting_Gamma.frm +++ b/Forms/Adjustments_Lighting_Gamma.frm @@ -139,7 +139,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Gamma Correction Handler -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 12/May/01 'Last updated: 19/July/17 'Last update: convert to XML params, minor optimizations @@ -211,7 +211,7 @@ Public Sub GammaCorrect(ByVal effectParams As String, Optional ByVal toPreview A 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 diff --git a/Forms/Adjustments_Monochrome_MonoToGray.frm b/Forms/Adjustments_Monochrome_MonoToGray.frm index b79bc6ae72..bf0ea876e5 100644 --- a/Forms/Adjustments_Monochrome_MonoToGray.frm +++ b/Forms/Adjustments_Monochrome_MonoToGray.frm @@ -87,7 +87,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Monochrome to Color (technically grayscale) Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 13/Feb/13 'Last updated: 23/August/13 'Last update: added command bar @@ -127,14 +127,14 @@ Public Sub ConvertMonoToColor(ByVal effectParams As String, Optional ByVal toPre 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent medianred pixel values from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -399,7 +399,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Monochrome to gray", , GetLocalParamString(), UNDO_LAYER + Process "Monochrome to gray", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Adjustments_Photo_HDR.frm b/Forms/Adjustments_Photo_HDR.frm index e99c28953a..062180a753 100644 --- a/Forms/Adjustments_Photo_HDR.frm +++ b/Forms/Adjustments_Photo_HDR.frm @@ -79,7 +79,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Imitation HDR Tool -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 09/July/14 'Last updated: 20/July/17 'Last update: migrate to XML params, minor performance improvements @@ -129,7 +129,7 @@ Public Sub ApplyImitationHDR(ByVal effectParams As String, Optional ByVal toPrev blendStrength = cParams.GetDouble("strength", 20#) 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference @@ -184,7 +184,7 @@ Public Sub ApplyImitationHDR(ByVal effectParams As String, Optional ByVal toPrev CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D PrepSafeArray srcSA, srcDIB CopyMemory ByVal VarPtrArray(srcImageData()), VarPtr(srcSA), 4 diff --git a/Forms/Adjustments_Photo_PhotoFilters.frm b/Forms/Adjustments_Photo_PhotoFilters.frm index 4711f08f99..11505c2ebe 100644 --- a/Forms/Adjustments_Photo_PhotoFilters.frm +++ b/Forms/Adjustments_Photo_PhotoFilters.frm @@ -77,7 +77,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Photo Filter Application Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 06/June/13 'Last updated: 02/August/16 'Last update: totally overhaul UI @@ -145,7 +145,7 @@ Private Sub cmdBar_AddCustomPresetData() End Sub Private Sub cmdBar_OKClick() - Process "Photo filter", , GetLocalParamString(), UNDO_LAYER + Process "Photo filter", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_ReadCustomPresetData() @@ -272,7 +272,7 @@ End Sub Private Sub lstFilters_DrawListEntry(ByVal bufferDC As Long, ByVal itemIndex As Long, itemTextEn As String, ByVal itemIsSelected As Boolean, ByVal itemIsHovered As Boolean, ByVal ptrToRectF As Long) 'Retrieve the boundary region for this list entry - Dim tmpRectF As RECTF + Dim tmpRectF As RectF CopyMemory ByVal VarPtr(tmpRectF), ByVal ptrToRectF, 16& Dim offsetY As Single, offsetX As Single @@ -297,7 +297,7 @@ Private Sub lstFilters_DrawListEntry(ByVal bufferDC As Long, ByVal itemIndex As End If 'Render a color box that represents the color of this filter - Dim colorRectF As RECTF + Dim colorRectF As RectF With colorRectF .Width = FixDPIFloat(64) .Height = FixDPIFloat(42) @@ -376,7 +376,7 @@ Public Sub ApplyPhotoFilter(ByVal effectParams As String, Optional ByVal toPrevi 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 diff --git a/Forms/Adjustments_Photo_RedEye.frm b/Forms/Adjustments_Photo_RedEye.frm index 27b5c8f4a0..41f479dcaa 100644 --- a/Forms/Adjustments_Photo_RedEye.frm +++ b/Forms/Adjustments_Photo_RedEye.frm @@ -150,7 +150,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Automated Red Eye Correction Tool -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 29/December/15 'Last updated: 29/December/15 'Last update: initial build @@ -216,7 +216,7 @@ Public Sub ApplyRedEyeCorrection(ByVal parameterList As String, Optional ByVal t 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 @@ -643,7 +643,7 @@ Public Sub ApplyRedEyeCorrection(ByVal parameterList As String, Optional ByVal t Next y Dim correctionFactor As Double - Dim regionRectF As RECTF + Dim regionRectF As RectF Dim innerInitX As Long, innerInitY As Long, innerFinalX As Long, innerFinalY As Long diff --git a/Forms/Adjustments_Photo_SplitTone.frm b/Forms/Adjustments_Photo_SplitTone.frm index f1bf795657..c707b42fc3 100644 --- a/Forms/Adjustments_Photo_SplitTone.frm +++ b/Forms/Adjustments_Photo_SplitTone.frm @@ -101,7 +101,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Split Toning Dialog -'Copyright 2015-2017 by Tanner Helland, first build Copyright 2014 by Audioglider +'Copyright 2015-2018 by Tanner Helland, first build Copyright 2014 by Audioglider 'Created: 07/May/14 'Last updated: 20/July/17 'Last update: migrate to XML params @@ -177,7 +177,7 @@ Public Sub SplitTone(ByVal effectParams As String, Optional ByVal toPreview As B 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D, tmpSA1D As SAFEARRAY1D + Dim tmpSA As SafeArray2D, tmpSA1D As SafeArray1D EffectPrep.PrepImageData tmpSA, toPreview, dstPic 'Local loop variables can be more efficiently cached by VB's compiler, so we transfer all relevant loop data here diff --git a/Forms/Adjustments_ShadowAndHighlight.frm b/Forms/Adjustments_ShadowAndHighlight.frm index 29f666d0cc..9c3d2ae33d 100644 --- a/Forms/Adjustments_ShadowAndHighlight.frm +++ b/Forms/Adjustments_ShadowAndHighlight.frm @@ -196,7 +196,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Shadow / Midtone / Highlight Adjustment Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 17/February/13 'Last updated: 20/July/17 'Last update: migrate to XML parameters @@ -222,7 +222,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Shadow and highlight", , GetLocalParamString(), UNDO_LAYER + Process "Shadow and highlight", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() @@ -259,7 +259,7 @@ Public Sub ApplyShadowHighlight(ByVal effectParams As String, Optional ByVal toP End With 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic AdjustDIBShadowHighlight shadowAmount, midtoneContrast, highlightAmount, shadowWidth, shadowRadius * curDIBValues.previewModifier, highlightWidth, highlightRadius * curDIBValues.previewModifier, workingDIB, toPreview diff --git a/Forms/Adjustments_WhiteBalance.frm b/Forms/Adjustments_WhiteBalance.frm index 6a2892749c..aaa296b1cd 100644 --- a/Forms/Adjustments_WhiteBalance.frm +++ b/Forms/Adjustments_WhiteBalance.frm @@ -65,7 +65,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'White Balance Handler -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 03/July/12 'Last updated: 24/August/13 'Last update: added command bar @@ -90,7 +90,7 @@ Option Explicit 'OK button Private Sub cmdBar_OKClick() - Process "White balance", , GetLocalParamString(), UNDO_LAYER + Process "White balance", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Dialog_AutosaveFound.frm b/Forms/Dialog_AutosaveFound.frm index 8cef312a4e..d890914840 100644 --- a/Forms/Dialog_AutosaveFound.frm +++ b/Forms/Dialog_AutosaveFound.frm @@ -145,7 +145,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Autosave (unsafe shutdown) Prompt/Dialog -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 19/January/14 'Last updated: 10/January/17 'Last update: implement better theming support diff --git a/Forms/Dialog_ColorSelector.frm b/Forms/Dialog_ColorSelector.frm index d13f08be3f..98c421e431 100644 --- a/Forms/Dialog_ColorSelector.frm +++ b/Forms/Dialog_ColorSelector.frm @@ -252,7 +252,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Color Selection Dialog -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 11/November/13 'Last updated: 14/May/16 'Last update: improve real-time handling of hex input @@ -502,7 +502,7 @@ Private Sub hstColors_DrawHistoryItem(ByVal histIndex As Long, ByVal histValue A If (Len(histValue) <> 0) And MainModule.IsProgramRunning() And (targetDC <> 0) Then - Dim tmpRectF As RECTF + Dim tmpRectF As RectF If (ptrToRectF <> 0) Then CopyMemory ByVal VarPtr(tmpRectF), ByVal ptrToRectF, LenB(tmpRectF) If (Not m_Painter Is Nothing) Then @@ -627,7 +627,7 @@ End Sub Private Sub noColor_DrawNewItem(ByVal targetDC As Long, ByVal ptrToRectF As Long) - Dim tmpRectF As RECTF + Dim tmpRectF As RectF If (ptrToRectF <> 0) Then CopyMemory ByVal VarPtr(tmpRectF), ByVal ptrToRectF, LenB(tmpRectF) If MainModule.IsProgramRunning() And (Not m_Painter Is Nothing) And (targetDC <> 0) Then @@ -648,7 +648,7 @@ End Sub Private Sub noColor_DrawOldItem(ByVal targetDC As Long, ByVal ptrToRectF As Long) - Dim tmpRectF As RECTF + Dim tmpRectF As RectF If (ptrToRectF <> 0) Then CopyMemory ByVal VarPtr(tmpRectF), ByVal ptrToRectF, LenB(tmpRectF) If MainModule.IsProgramRunning() And (Not m_Painter Is Nothing) And (targetDC <> 0) Then diff --git a/Forms/Dialog_EditPreset.frm b/Forms/Dialog_EditPreset.frm index 7d60e03732..cb541b32d2 100644 --- a/Forms/Dialog_EditPreset.frm +++ b/Forms/Dialog_EditPreset.frm @@ -63,7 +63,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Preset Editor Dialog -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 06/March/15 'Last updated: 02/September/15 'Last update: convert to the new mini-command-bar UC diff --git a/Forms/Dialog_FillSettings.frm b/Forms/Dialog_FillSettings.frm index 1fce40adb1..e54570b132 100644 --- a/Forms/Dialog_FillSettings.frm +++ b/Forms/Dialog_FillSettings.frm @@ -243,7 +243,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Brush Selection Dialog -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 30/June/15 (but assembled from many bits written earlier) 'Last updated: 16/June/16 'Last update: overhaul UI to make better use of available space @@ -534,7 +534,7 @@ Private Sub UpdatePreview() UpdateFillObject 'Retrieve a matching brush handle - Dim gdipBrush As Long, cBounds As RECTF + Dim gdipBrush As Long, cBounds As RectF With cBounds .Left = 0 @@ -581,7 +581,7 @@ End Sub Private Sub lstFillPattern_DrawListEntry(ByVal bufferDC As Long, ByVal itemIndex As Long, itemTextEn As String, ByVal itemIsSelected As Boolean, ByVal itemIsHovered As Boolean, ByVal ptrToRectF As Long) - Dim tmpRectF As RECTF + Dim tmpRectF As RectF CopyMemory ByVal VarPtr(tmpRectF), ByVal ptrToRectF, 16& Dim itemBackColor As Long, itemTextColor As Long, itemBorderColor As Long, hatchBorderColor As Long @@ -618,7 +618,7 @@ Private Sub lstFillPattern_DrawListEntry(ByVal bufferDC As Long, ByVal itemIndex Set tmpFont = Nothing 'Finally, draw the hatch - Dim hatchRect As RECTF + Dim hatchRect As RectF With hatchRect .Left = tmpRectF.Left + FixDPI(4) + m_LargestWidth diff --git a/Forms/Dialog_GenericRemember.frm b/Forms/Dialog_GenericRemember.frm index 7806ccab01..40c90e8847 100644 --- a/Forms/Dialog_GenericRemember.frm +++ b/Forms/Dialog_GenericRemember.frm @@ -87,7 +87,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Generic Yes/No/Cancel Dialog with automatic "Remember My Choice" handling -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 01/December/12 'Last updated: 04/May/15 'Last update: merge code from other dialogs into a single, universal version diff --git a/Forms/Dialog_GradientEditor.frm b/Forms/Dialog_GradientEditor.frm index 31a8a05ed7..c82809fc2b 100644 --- a/Forms/Dialog_GradientEditor.frm +++ b/Forms/Dialog_GradientEditor.frm @@ -361,7 +361,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Gradient Editor Dialog -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 23/July/15 (but assembled from many bits written earlier) 'Last updated: 05/October/17 'Last update: add "automatic" mode for creating noisy gradients diff --git a/Forms/Dialog_IDEWarning.frm b/Forms/Dialog_IDEWarning.frm index 8a30860eed..f1c76093e3 100644 --- a/Forms/Dialog_IDEWarning.frm +++ b/Forms/Dialog_IDEWarning.frm @@ -118,7 +118,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'IDE Warning Dialog -'Copyright 2011-2017 by Tanner Helland +'Copyright 2011-2018 by Tanner Helland 'Created: 15/December/12 'Last updated: 15/December/12 'Last update: initial build; this replaces the generic message box previously used diff --git a/Forms/Dialog_MsgBox.frm b/Forms/Dialog_MsgBox.frm index 50b1122ca8..e4cd87839d 100644 --- a/Forms/Dialog_MsgBox.frm +++ b/Forms/Dialog_MsgBox.frm @@ -100,7 +100,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Homebrew Message Box Replacement -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 15/August/17 'Last updated: 17/August/17 'Last update: wrap up initial build @@ -349,7 +349,7 @@ Public Function ShowDialog(ByVal pMessage As String, ByVal pButtons As VbMsgBoxS 'We also want to know some basic metrics of the dialog itself, specifically how large we are allowed to ' physically make it. - Dim finalFormWidth As Long, curCanvasWidth As Long, curScreenWidth As Long, curScreenRect As RECTL + Dim finalFormWidth As Long, curCanvasWidth As Long, curScreenWidth As Long, curScreenRect As RectL 'At present, the largest allowable size for a message box is the smaller of: ' 1) the primary canvas size, or... diff --git a/Forms/Dialog_OutlineSettings.frm b/Forms/Dialog_OutlineSettings.frm index 41ee55256a..f814aa93f1 100644 --- a/Forms/Dialog_OutlineSettings.frm +++ b/Forms/Dialog_OutlineSettings.frm @@ -181,7 +181,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Pen Selection Dialog -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 30/June/15 (but assembled from many bits written earlier) 'Last updated: 30/June/15 'Last update: start migrating pen creation bits into this singular dialog @@ -410,7 +410,7 @@ Private Sub UpdatePreview() End If 'Prep the preview path. Note that we manually pad it to make the preview look a little prettier. - Dim tmpRect As RECTF, hPadding As Single, vPadding As Single + Dim tmpRect As RectF, hPadding As Single, vPadding As Single hPadding = m_PenPreview.GetPenProperty(P2_PenWidth) * 2 If hPadding > FixDPIFloat(12) Then hPadding = FixDPIFloat(12) diff --git a/Forms/Dialog_ToneMapping.frm b/Forms/Dialog_ToneMapping.frm index a5a833c8cc..43a6691bc5 100644 --- a/Forms/Dialog_ToneMapping.frm +++ b/Forms/Dialog_ToneMapping.frm @@ -291,7 +291,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Tone Mapping (e.g. high-bit-depth image import) Dialog -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 04/December/14 'Last updated: 08/Augusts/17 'Last update: migrate to XML params, many performance improvements diff --git a/Forms/Dialog_UITheme.frm b/Forms/Dialog_UITheme.frm index 6f39d7aefc..2ea42dfbbc 100644 --- a/Forms/Dialog_UITheme.frm +++ b/Forms/Dialog_UITheme.frm @@ -94,7 +94,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'First-run Dialog -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 12/February/12 'Last updated: 14/February/17 'Last update: finally finish implementing this thing! diff --git a/Forms/Dialog_UnsavedChanges.frm b/Forms/Dialog_UnsavedChanges.frm index eb24d65f4f..8e55041f04 100644 --- a/Forms/Dialog_UnsavedChanges.frm +++ b/Forms/Dialog_UnsavedChanges.frm @@ -134,7 +134,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Unsaved Changes Dialog -'Copyright 2011-2017 by Tanner Helland +'Copyright 2011-2018 by Tanner Helland 'Created: 13/November/12 'Last updated: 01/December/12 'Last update: removed the DrawSystemIcon sub; now it can be found in the "Drawing" module diff --git a/Forms/Dialog_UpdateAvailable.frm b/Forms/Dialog_UpdateAvailable.frm index 256ee2d262..97b0a678fa 100644 --- a/Forms/Dialog_UpdateAvailable.frm +++ b/Forms/Dialog_UpdateAvailable.frm @@ -87,7 +87,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Update Notification form -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 03/March/14 'Last updated: 06/September/15 'Last update: convert buttons to pdButton diff --git a/Forms/Edit_Fade.frm b/Forms/Edit_Fade.frm index 7baeda0f75..633a76b64f 100644 --- a/Forms/Edit_Fade.frm +++ b/Forms/Edit_Fade.frm @@ -75,7 +75,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Fade Previous Action Dialog -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 13/October/00 'Last updated: 08/August/17 'Last update: migrate to XML params @@ -113,7 +113,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Fade", , GetLocalParamString(), UNDO_LAYER + Process "Fade", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() @@ -182,7 +182,7 @@ Public Sub fxFadeLastAction(ByVal effectParams As String, Optional ByVal toPrevi 'During a preview, we only retrieve the portion of each layer that's visible in the current preview box If toPreview Then - Dim tmpSafeArray As SAFEARRAY2D + Dim tmpSafeArray As SafeArray2D 'Retrieve the preview box portion of the previous layer image EffectPrep.ResetPreviewIDs @@ -219,7 +219,7 @@ Public Sub fxFadeLastAction(ByVal effectParams As String, Optional ByVal toPrevi pdImages(g_CurrentImage).GetLayerByID(m_relevantLayerID).layerDIB.CreateFromExistingDIB m_prevLayerDIBCopy 'Notify the parent of the change - pdImages(g_CurrentImage).NotifyImageChanged UNDO_LAYER, pdImages(g_CurrentImage).GetLayerIndexFromID(m_relevantLayerID) + pdImages(g_CurrentImage).NotifyImageChanged UNDO_Layer, pdImages(g_CurrentImage).GetLayerIndexFromID(m_relevantLayerID) SyncInterfaceToCurrentImage ViewportEngine.Stage2_CompositeAllLayers pdImages(g_CurrentImage), FormMain.mainCanvas(0) diff --git a/Forms/Edit_UndoHistory.frm b/Forms/Edit_UndoHistory.frm index 1976f2d1e3..15e0af279d 100644 --- a/Forms/Edit_UndoHistory.frm +++ b/Forms/Edit_UndoHistory.frm @@ -62,7 +62,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Undo History dialog -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 14/July/14 'Last updated: 22/May/16 'Last update: overhaul UI to use new owner-drawn pdListBox @@ -108,20 +108,20 @@ Private Function GetStringForUndoType(ByVal typeOfUndo As PD_UndoType, Optional Select Case typeOfUndo - Case UNDO_EVERYTHING + Case UNDO_Everything newText = vbNullString - Case UNDO_IMAGE, UNDO_IMAGE_VECTORSAFE, UNDO_IMAGEHEADER + Case UNDO_Image, UNDO_Image_VectorSafe, UNDO_ImageHeader newText = vbNullString - Case UNDO_LAYER, UNDO_LAYER_VECTORSAFE, UNDO_LAYERHEADER + Case UNDO_Layer, UNDO_Layer_VectorSafe, UNDO_LayerHeader If Not (pdImages(g_CurrentImage).GetLayerByID(layerID) Is Nothing) Then newText = g_Language.TranslateMessage("layer: %1", pdImages(g_CurrentImage).GetLayerByID(layerID).GetLayerName()) Else newText = vbNullString End If - Case UNDO_SELECTION + Case UNDO_Selection newText = g_Language.TranslateMessage("selection shape shown") End Select @@ -134,7 +134,7 @@ Private Sub cmdBar_OKClick() Dim cParams As pdParamXML Set cParams = New pdParamXML cParams.AddParam "UndoHistoryPoint", lstUndo.ListIndex + 1 - Process "Undo history", , cParams.GetParamString(), UNDO_NOTHING + Process "Undo history", , cParams.GetParamString(), UNDO_Nothing End Sub Private Sub Form_Load() @@ -178,7 +178,7 @@ End Sub Private Sub lstUndo_DrawListEntry(ByVal bufferDC As Long, ByVal itemIndex As Long, itemTextEn As String, ByVal itemIsSelected As Boolean, ByVal itemIsHovered As Boolean, ByVal ptrToRectF As Long) 'Retrieve the boundary region for this list entry - Dim tmpRectF As RECTF + Dim tmpRectF As RectF CopyMemory ByVal VarPtr(tmpRectF), ByVal ptrToRectF, 16& Dim offsetY As Single, offsetX As Single diff --git a/Forms/Effects_Artistic_ColoredPencil.frm b/Forms/Effects_Artistic_ColoredPencil.frm index 534c8ffd84..257124621e 100644 --- a/Forms/Effects_Artistic_ColoredPencil.frm +++ b/Forms/Effects_Artistic_ColoredPencil.frm @@ -86,7 +86,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Pencil Sketch Image Effect -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: sometime 2001 'Last updated: 26/July/17 'Last update: performance improvements, migrate to XML params diff --git a/Forms/Effects_Artistic_ComicBook.frm b/Forms/Effects_Artistic_ComicBook.frm index 8d4b4b7b3f..1f2a237d78 100644 --- a/Forms/Effects_Artistic_ComicBook.frm +++ b/Forms/Effects_Artistic_ComicBook.frm @@ -86,7 +86,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Comic Book Image Effect -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 02/Feb/13 (ish... I didn't write it down, alas) 'Last updated: 23/May/16 'Last update: optimize function a bit @@ -127,7 +127,7 @@ Public Sub fxComicBook(ByVal effectParams As String, Optional ByVal toPreview As If (Not toPreview) Then Message "Animating image (stage %1 of %2)...", 1, 3 + colorStrength 'Initiate PhotoDemon's central image handler - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'During a preview, the smudge radius must be reduced to match the preview size @@ -216,7 +216,7 @@ Private Sub btsStrength_Click(ByVal buttonIndex As Long) End Sub Private Sub cmdBar_OKClick() - Process "Comic book", , GetLocalParamString(), UNDO_LAYER + Process "Comic book", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Artistic_FiguredGlass.frm b/Forms/Effects_Artistic_FiguredGlass.frm index 2ce5a3028e..586bc851cb 100644 --- a/Forms/Effects_Artistic_FiguredGlass.frm +++ b/Forms/Effects_Artistic_FiguredGlass.frm @@ -105,7 +105,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image "Figured Glass" Distortion -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 08/January/13 'Last updated: 26/July/17 'Last update: performance optimizations (10+% time reduction), convert to XML params diff --git a/Forms/Effects_Artistic_FilmNoir.frm b/Forms/Effects_Artistic_FilmNoir.frm index 42d23a90c7..4a1a424cc5 100644 --- a/Forms/Effects_Artistic_FilmNoir.frm +++ b/Forms/Effects_Artistic_FilmNoir.frm @@ -118,7 +118,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Film Noir Effect Interface -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: some time 2013 'Last updated: 04/October/15 'Last update: rewrite the old "one-click" filter from scratch, and completely rethink the algorithm while I'm at it. @@ -177,7 +177,7 @@ Public Sub fxFilmNoir(ByVal parameterList As String, Optional ByVal toPreview As 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 @@ -262,7 +262,7 @@ Public Sub fxFilmNoir(ByVal parameterList As String, Optional ByVal toPreview As End Sub Private Sub cmdBar_OKClick() - Process "Film noir", , GetLocalParamString(), UNDO_LAYER + Process "Film noir", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Artistic_GlassTiles.frm b/Forms/Effects_Artistic_GlassTiles.frm index ec49920e8b..870f51312b 100644 --- a/Forms/Effects_Artistic_GlassTiles.frm +++ b/Forms/Effects_Artistic_GlassTiles.frm @@ -122,7 +122,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Glass Tiles Filter Dialog -'Copyright 2014-2017 by dotPDN LLC, Rick Brewster, Tom Jackson, Audioglider, and Tanner Helland (see details below) +'Copyright 2014-2018 by dotPDN LLC, Rick Brewster, Tom Jackson, Audioglider, and Tanner Helland (see details below) 'Created: 23/May/14 'Last updated: 01/August/17 'Last update: migrate to PD's internal filter support engine, including internal supersampling techniques @@ -171,14 +171,14 @@ Public Sub GlassTiles(ByVal effectParams As String, Optional ByVal toPreview As 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -389,7 +389,7 @@ Private Sub cboEdges_Click() End Sub Private Sub cmdBar_OKClick() - Process "Glass tiles", , GetLocalParamString(), UNDO_LAYER + Process "Glass tiles", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Artistic_Kaleidoscope.frm b/Forms/Effects_Artistic_Kaleidoscope.frm index 9c90690372..2da60be9e6 100644 --- a/Forms/Effects_Artistic_Kaleidoscope.frm +++ b/Forms/Effects_Artistic_Kaleidoscope.frm @@ -199,7 +199,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image "Kaleiodoscope" Distortion -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 14/January/13 'Last updated: 26/July/17 'Last update: performance improvements, migrate to XML params @@ -245,14 +245,14 @@ Public Sub KaleidoscopeImage(ByVal effectParams As String, Optional ByVal toPrev 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -375,7 +375,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Kaleidoscope", , GetLocalParamString(), UNDO_LAYER + Process "Kaleidoscope", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Artistic_ModernArt.frm b/Forms/Effects_Artistic_ModernArt.frm index bf1e48c08d..d223fba8e1 100644 --- a/Forms/Effects_Artistic_ModernArt.frm +++ b/Forms/Effects_Artistic_ModernArt.frm @@ -90,7 +90,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Modern Art Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 09/Feb/13 'Last updated: 23/November/15 'Last update: convert to XML parameter list @@ -132,7 +132,7 @@ Public Sub ApplyModernArt(ByVal parameterList As String, Optional ByVal toPrevie 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 diff --git a/Forms/Effects_Artistic_OilPainting.frm b/Forms/Effects_Artistic_OilPainting.frm index bb5d61f587..ffd78372fe 100644 --- a/Forms/Effects_Artistic_OilPainting.frm +++ b/Forms/Effects_Artistic_OilPainting.frm @@ -78,7 +78,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Oil Painting Effect Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 09/August/13 'Last updated: 26/July/17 'Last update: performance improvements, migrate to XML params @@ -116,7 +116,7 @@ Public Sub ApplyOilPaintingEffect(ByVal parameterList As String, Optional ByVal 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 @@ -129,7 +129,7 @@ Public Sub ApplyOilPaintingEffect(ByVal parameterList As String, Optional ByVal 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent medianred pixel values from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D PrepSafeArray srcSA, srcDIB CopyMemory ByVal VarPtrArray(srcImageData()), VarPtr(srcSA), 4 @@ -473,7 +473,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Oil painting", , GetLocalParamString(), UNDO_LAYER + Process "Oil painting", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Artistic_PlasticWrap.frm b/Forms/Effects_Artistic_PlasticWrap.frm index 9a718e06f4..8a3a43ada0 100644 --- a/Forms/Effects_Artistic_PlasticWrap.frm +++ b/Forms/Effects_Artistic_PlasticWrap.frm @@ -118,7 +118,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** '"Plastic Wrap" Image effect -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 03/August/17 'Last updated: 07/August/17 'Last update: put finishing touches on the algorithm @@ -176,7 +176,7 @@ Public Sub ApplyPlasticWrap(ByVal effectParams As String, Optional ByVal toPrevi End With 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'If this is a preview, we need to adjust the smoothness (kernel radius) to match the size of the preview box @@ -204,8 +204,8 @@ Public Sub ApplyPlasticWrap(ByVal effectParams As String, Optional ByVal toPrevi 'We will be using pdFilterLUT to generate corresponding RGB lookup tables, which means we need to use ' POINTFLOAT arrays - Dim gCurve() As POINTFLOAT - ReDim gCurve(0 To wrapDetail) As POINTFLOAT + Dim gCurve() As PointFloat + ReDim gCurve(0 To wrapDetail) As PointFloat Dim detailModifier As Double detailModifier = 1# / CDbl(wrapDetail) diff --git a/Forms/Effects_Artistic_Posterize.frm b/Forms/Effects_Artistic_Posterize.frm index fbdfc6aaec..af01b69cb2 100644 --- a/Forms/Effects_Artistic_Posterize.frm +++ b/Forms/Effects_Artistic_Posterize.frm @@ -112,7 +112,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Posterizing Effect Handler -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 4/15/01 'Last updated: 26/July/17 'Last update: performance improvements, migrate to XML params @@ -136,7 +136,7 @@ Private Sub chkSmartColors_Click() End Sub Private Sub cmdBar_OKClick() - Process "Posterize", , GetLocalParamString(), UNDO_LAYER + Process "Posterize", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() @@ -191,7 +191,7 @@ Public Sub ReduceImageColors_BitRGB(ByVal rValue As Byte, ByVal gValue As Byte, 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 @@ -359,7 +359,7 @@ Public Sub ReduceImageColors_BitRGB_ErrorDif(ByVal rValue As Byte, ByVal gValue 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 diff --git a/Forms/Effects_Artistic_Relief.frm b/Forms/Effects_Artistic_Relief.frm index c782664382..d3f54c0e83 100644 --- a/Forms/Effects_Artistic_Relief.frm +++ b/Forms/Effects_Artistic_Relief.frm @@ -91,7 +91,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Relief Artistic Effect Dialog -'Copyright 2003-2017 by Tanner Helland +'Copyright 2003-2018 by Tanner Helland 'Created: sometime 2003 'Last updated: 26/July/17 'Last update: performance improvements, migrate to XML params @@ -110,7 +110,7 @@ Option Explicit 'OK button Private Sub cmdBar_OKClick() - Process "Relief", , GetLocalParamString(), UNDO_LAYER + Process "Relief", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() @@ -155,14 +155,14 @@ Public Sub ApplyReliefEffect(ByVal effectParams As String, Optional ByVal toPrev 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent already embossed pixels from screwing up our results for later pixels.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB diff --git a/Forms/Effects_Artistic_StainedGlass.frm b/Forms/Effects_Artistic_StainedGlass.frm index 30b6d9ba99..57b47e121e 100644 --- a/Forms/Effects_Artistic_StainedGlass.frm +++ b/Forms/Effects_Artistic_StainedGlass.frm @@ -126,7 +126,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Stained Glass Effect Interface -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 14/July/14 'Last updated: 26/July/17 'Last update: performance improvements, migrate to XML params diff --git a/Forms/Effects_Blur_BoxBlur.frm b/Forms/Effects_Blur_BoxBlur.frm index 048b2f127a..a860242a20 100644 --- a/Forms/Effects_Blur_BoxBlur.frm +++ b/Forms/Effects_Blur_BoxBlur.frm @@ -88,7 +88,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Box Blur Tool -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: some time 2000 'Last updated: 27/July/17 'Last update: performance improvements, migrate to XML params @@ -128,7 +128,7 @@ Public Sub BoxBlurFilter(ByVal effectParams As String, Optional ByVal toPreview 'Create a local array and point it at the pixel data of the current image. (Note that we deliberately ' leave alpha byte premultiplied!) - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic, , , True 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference @@ -158,7 +158,7 @@ Public Sub BoxBlurFilter(ByVal effectParams As String, Optional ByVal toPreview End Sub Private Sub cmdBar_OKClick() - Process "Box blur", , GetLocalParamString(), UNDO_LAYER + Process "Box blur", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Blur_GaussianBlur.frm b/Forms/Effects_Blur_GaussianBlur.frm index 4a313f6be0..2d17ccd1b5 100644 --- a/Forms/Effects_Blur_GaussianBlur.frm +++ b/Forms/Effects_Blur_GaussianBlur.frm @@ -75,7 +75,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Gaussian Blur Tool -'Copyright 2010-2017 by Tanner Helland +'Copyright 2010-2018 by Tanner Helland 'Created: 01/July/10 'Last updated: 27/July/17 'Last update: performance improvements, migrate to XML params @@ -128,7 +128,7 @@ Public Sub GaussianBlurFilter(ByVal effectParams As String, Optional ByVal toPre If (gaussQuality > 1) Then gaussQuality = 1 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic, , , True 'If this is a preview, we need to adjust the kernel radius to match the size of the preview box @@ -168,7 +168,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Gaussian blur", , GetLocalParamString(), UNDO_LAYER + Process "Gaussian blur", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Blur_MotionBlur.frm b/Forms/Effects_Blur_MotionBlur.frm index b22e4b7938..fd38ee07d5 100644 --- a/Forms/Effects_Blur_MotionBlur.frm +++ b/Forms/Effects_Blur_MotionBlur.frm @@ -97,7 +97,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Motion Blur Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 26/August/13 'Last updated: 27/July/17 'Last update: performance improvements, migrate to XML params @@ -136,7 +136,7 @@ Public Sub MotionBlurFilter(ByVal effectParams As String, Optional ByVal toPrevi End With 'Call prepImageData, which will initialize a workingDIB object for us (with all selection tool masks applied) - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic, , , True 'If this is a preview, we need to adjust the kernel radius to match the size of the preview box @@ -209,7 +209,7 @@ Private Sub chkSymmetry_Click() End Sub Private Sub cmdBar_OKClick() - Process "Motion blur", , GetLocalParamString(), UNDO_LAYER + Process "Motion blur", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Blur_RadialBlur.frm b/Forms/Effects_Blur_RadialBlur.frm index 464ae077bc..7a0a356690 100644 --- a/Forms/Effects_Blur_RadialBlur.frm +++ b/Forms/Effects_Blur_RadialBlur.frm @@ -86,7 +86,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Radial Blur Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 26/August/13 'Last updated: 27/July/17 'Last update: performance improvements, migrate to XML params @@ -124,7 +124,7 @@ Public Sub RadialBlurFilter(ByVal effectParams As String, Optional ByVal toPrevi End With 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic, , , True 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference @@ -226,7 +226,7 @@ Private Sub chkSymmetry_Click() End Sub Private Sub cmdBar_OKClick() - Process "Radial blur", , GetLocalParamString(), UNDO_LAYER + Process "Radial blur", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Blur_SNN.frm b/Forms/Effects_Blur_SNN.frm index 878d6855fe..7eac84decf 100644 --- a/Forms/Effects_Blur_SNN.frm +++ b/Forms/Effects_Blur_SNN.frm @@ -76,7 +76,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Symmetric Nearest-Neighbor dialog -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 15/December/15 'Last updated: 26/July/17 'Last update: performance improvements, migrate to XML params diff --git a/Forms/Effects_Blur_SurfaceBlur.frm b/Forms/Effects_Blur_SurfaceBlur.frm index 386aa7be65..a335f53f82 100644 --- a/Forms/Effects_Blur_SurfaceBlur.frm +++ b/Forms/Effects_Blur_SurfaceBlur.frm @@ -98,7 +98,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Surface Blur Tool (formerly "Smart Blur") -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 17/January/13 'Last updated: 27/July/17 'Last update: performance improvements, migrate to XML params @@ -148,7 +148,7 @@ Public Sub SurfaceBlurFilter(ByVal effectParams As String, Optional ByVal toPrev Dim tDelta As Long 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference @@ -207,12 +207,12 @@ Public Sub SurfaceBlurFilter(ByVal effectParams As String, Optional ByVal toPrev CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D PrepSafeArray srcSA, srcDIB CopyMemory ByVal VarPtrArray(srcImageData()), VarPtr(srcSA), 4 Dim GaussImageData() As Byte - Dim gaussSA As SAFEARRAY2D + Dim gaussSA As SafeArray2D PrepSafeArray gaussSA, gaussDIB CopyMemory ByVal VarPtrArray(GaussImageData()), VarPtr(gaussSA), 4 @@ -306,7 +306,7 @@ Private Sub btsQuality_Click(ByVal buttonIndex As Long) End Sub Private Sub cmdBar_OKClick() - Process "Surface blur", , GetLocalParamString(), UNDO_LAYER + Process "Surface blur", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Blur_ZoomBlur.frm b/Forms/Effects_Blur_ZoomBlur.frm index a1e5625f8c..be3ed62293 100644 --- a/Forms/Effects_Blur_ZoomBlur.frm +++ b/Forms/Effects_Blur_ZoomBlur.frm @@ -119,7 +119,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Zoom Blur Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 27/August/13 'Last updated: 11/June/16 'Last update: rewrite algorithm to support variable center positioning @@ -150,7 +150,7 @@ Public Sub ApplyZoomBlur(ByVal functionParams As String, Optional ByVal toPrevie 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic, , , True CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 @@ -160,7 +160,7 @@ Public Sub ApplyZoomBlur(ByVal functionParams As String, Optional ByVal toPrevie Set srcDIB = New pdDIB srcDIB.CreateFromExistingDIB workingDIB - Dim srcImageData() As Byte, srcSA As SAFEARRAY2D + Dim srcImageData() As Byte, srcSA As SafeArray2D srcDIB.WrapArrayAroundDIB srcImageData, srcSA 'Local loop variables can be more efficiently cached by VB's compiler, so we transfer all relevant loop data here @@ -328,7 +328,7 @@ Public Sub ApplyZoomBlur(ByVal functionParams As String, Optional ByVal toPrevie End Sub Private Sub cmdBar_OKClick() - Process "Zoom blur", , GetFilterParamString(), UNDO_LAYER + Process "Zoom blur", , GetFilterParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_CustomFilter.frm b/Forms/Effects_CustomFilter.frm index 8dafa30646..eff149acb8 100644 --- a/Forms/Effects_CustomFilter.frm +++ b/Forms/Effects_CustomFilter.frm @@ -445,7 +445,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Custom Filter Handler -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 15/April/01 'Last updated: 31/July/17 'Last update: performance improvements, migrate to XML params @@ -466,7 +466,7 @@ Private Sub chkNormalize_Click() End Sub Private Sub cmdBar_OKClick() - Process "Custom filter", , GetLocalParamString(), UNDO_LAYER + Process "Custom filter", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Distort_ApplyLens.frm b/Forms/Effects_Distort_ApplyLens.frm index 2edfc1bf98..19e14fbe33 100644 --- a/Forms/Effects_Distort_ApplyLens.frm +++ b/Forms/Effects_Distort_ApplyLens.frm @@ -159,7 +159,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Lens Correction and Distortion -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 05/January/13 'Last updated: 27/July/17 'Last update: performance improvements, migrate to XML params diff --git a/Forms/Effects_Distort_CorrectLens.frm b/Forms/Effects_Distort_CorrectLens.frm index dd2403c2ce..c3fcae91ff 100644 --- a/Forms/Effects_Distort_CorrectLens.frm +++ b/Forms/Effects_Distort_CorrectLens.frm @@ -293,7 +293,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Fix Lens Distort Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 22/January/13 'Last updated: 27/July/17 'Last update: performance improvements, migrate to XML params @@ -379,14 +379,14 @@ Public Sub ApplyLensCorrection_Advanced(ByVal effectParameters As String, Option 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -629,14 +629,14 @@ Public Sub ApplyLensCorrection_Basic(ByVal effectParameters As String, Optional 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -850,7 +850,7 @@ Public Sub ApplyLensCorrection_Basic(ByVal effectParameters As String, Optional End Sub Private Sub cmdBar_OKClick() - Process "Correct lens distortion", , GetEffectParams(), UNDO_LAYER + Process "Correct lens distortion", , GetEffectParams(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Distort_Donut.frm b/Forms/Effects_Distort_Donut.frm index 666b6aebfb..5a8adea880 100644 --- a/Forms/Effects_Distort_Donut.frm +++ b/Forms/Effects_Distort_Donut.frm @@ -227,7 +227,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image "Donut" Distortion -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 01/April/15 'Last updated: 27/July/17 'Last update: performance improvements, migrate to XML params @@ -281,14 +281,14 @@ Public Sub ApplyDonutDistortion(ByVal effectParams As String, Optional ByVal toP 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -503,7 +503,7 @@ Public Sub ApplyDonutDistortion(ByVal effectParams As String, Optional ByVal toP End Sub Private Sub cmdBar_OKClick() - Process "Donut", , GetLocalParamString(), UNDO_LAYER + Process "Donut", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Distort_Miscellaneous.frm b/Forms/Effects_Distort_Miscellaneous.frm index b24dcba5d1..2e0a3a4d35 100644 --- a/Forms/Effects_Distort_Miscellaneous.frm +++ b/Forms/Effects_Distort_Miscellaneous.frm @@ -86,7 +86,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Miscellaneous Distort Tools -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 07/June/13 'Last updated: 27/July/17 'Last update: performance improvements, migrate to XML params @@ -128,14 +128,14 @@ Public Sub ApplyMiscDistort(ByVal effectParams As String, Optional ByVal toPrevi 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -394,7 +394,7 @@ Public Sub ApplyMiscDistort(ByVal effectParams As String, Optional ByVal toPrevi End Sub Private Sub cmdBar_OKClick() - Process "Miscellaneous distort", , GetLocalParamString(), UNDO_LAYER + Process "Miscellaneous distort", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Distort_Pinch.frm b/Forms/Effects_Distort_Pinch.frm index bdc94e99a9..7ec9ea33e0 100644 --- a/Forms/Effects_Distort_Pinch.frm +++ b/Forms/Effects_Distort_Pinch.frm @@ -173,7 +173,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image "Pinch and Whirl" Distortion -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 05/January/13 'Last updated: 28/July/17 'Last update: performance improvements, migrate to XML params @@ -222,14 +222,14 @@ Public Sub PinchImage(ByVal effectParams As String, Optional ByVal toPreview As 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -460,7 +460,7 @@ Public Sub PinchImage(ByVal effectParams As String, Optional ByVal toPreview As End Sub Private Sub cmdBar_OKClick() - Process "Pinch and whirl", , GetLocalParamString(), UNDO_LAYER + Process "Pinch and whirl", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Distort_Poke.frm b/Forms/Effects_Distort_Poke.frm index 1f7001b994..dc247a3614 100644 --- a/Forms/Effects_Distort_Poke.frm +++ b/Forms/Effects_Distort_Poke.frm @@ -148,7 +148,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Poke Distort Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 05/June/13 'Last updated: 28/July/17 'Last update: performance improvements, migrate to XML params @@ -200,14 +200,14 @@ Public Sub ApplyPokeDistort(ByVal effectParams As String, Optional ByVal toPrevi 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -427,7 +427,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Poke", , GetLocalParamString(), UNDO_LAYER + Process "Poke", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Distort_Ripple.frm b/Forms/Effects_Distort_Ripple.frm index 2d8f214bd3..d64cc1e20b 100644 --- a/Forms/Effects_Distort_Ripple.frm +++ b/Forms/Effects_Distort_Ripple.frm @@ -216,7 +216,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image "Ripple" Distortion -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 06/January/13 'Last updated: 28/July/17 'Last update: performance improvements, migrate to XML params @@ -275,14 +275,14 @@ Public Sub RippleImage(ByVal effectParams As String, Optional ByVal toPreview As 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -504,7 +504,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Ripple", , GetLocalParamString(), UNDO_LAYER + Process "Ripple", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Distort_Squish.frm b/Forms/Effects_Distort_Squish.frm index 96cf499685..6282b300b7 100644 --- a/Forms/Effects_Distort_Squish.frm +++ b/Forms/Effects_Distort_Squish.frm @@ -103,7 +103,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Squish Distortion (formerly Fixed Perspective) -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 04/April/13 'Last updated: 28/July/17 'Last update: performance improvements, migrate to XML params @@ -146,14 +146,14 @@ Public Sub SquishImage(ByVal effectParams As String, Optional ByVal toPreview As 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -365,7 +365,7 @@ Public Sub SquishImage(ByVal effectParams As String, Optional ByVal toPreview As End Sub Private Sub cmdBar_OKClick() - Process "Squish", , GetLocalParamString(), UNDO_LAYER + Process "Squish", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Distort_Swirl.frm b/Forms/Effects_Distort_Swirl.frm index 97356e3564..cedfd0d458 100644 --- a/Forms/Effects_Distort_Swirl.frm +++ b/Forms/Effects_Distort_Swirl.frm @@ -160,7 +160,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image "Swirl" Distortion -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 05/January/13 'Last updated: 28/July/17 'Last update: performance improvements, migrate to XML params @@ -209,14 +209,14 @@ Public Sub SwirlImage(ByVal effectParams As String, Optional ByVal toPreview As 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -425,7 +425,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Swirl", , GetLocalParamString(), UNDO_LAYER + Process "Swirl", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Distort_Waves.frm b/Forms/Effects_Distort_Waves.frm index efea0fdad4..440c0755ea 100644 --- a/Forms/Effects_Distort_Waves.frm +++ b/Forms/Effects_Distort_Waves.frm @@ -129,7 +129,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image "Waves" Distortion -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 07/January/13 'Last updated: 28/July/17 'Last update: performance improvements, migrate to XML params @@ -178,14 +178,14 @@ Public Sub WaveImage(ByVal effectParams As String, Optional ByVal toPreview As B 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -373,7 +373,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Waves", , GetLocalParamString(), UNDO_LAYER + Process "Waves", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Edge_Emboss.frm b/Forms/Effects_Edge_Emboss.frm index 2630ec5ed8..22e732e72a 100644 --- a/Forms/Effects_Edge_Emboss.frm +++ b/Forms/Effects_Edge_Emboss.frm @@ -103,7 +103,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Emboss/Engrave Effect Dialog -'Copyright 2003-2017 by Tanner Helland +'Copyright 2003-2018 by Tanner Helland 'Created: 3/6/03 'Last updated: 28/July/17 'Last update: performance improvements, migrate to XML params @@ -178,14 +178,14 @@ Public Sub ApplyEmbossEffect(ByVal effectParams As String, Optional ByVal toPrev 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent already embossed pixels from screwing up our results for later pixels.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB diff --git a/Forms/Effects_Edge_EnhanceEdges.frm b/Forms/Effects_Edge_EnhanceEdges.frm index 22b420862b..652012e225 100644 --- a/Forms/Effects_Edge_EnhanceEdges.frm +++ b/Forms/Effects_Edge_EnhanceEdges.frm @@ -109,7 +109,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Edge Enhancement Interface -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: sometimes 2002 'Last updated: 29/July/17 'Last update: performance improvements, migrate to XML params @@ -152,7 +152,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Enhance edges", , GetLocalParamString(), UNDO_LAYER + Process "Enhance edges", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() @@ -216,7 +216,7 @@ Public Sub ApplyEdgeEnhancement(ByVal effectParams As String, Optional ByVal toP If (Not toPreview) Then Message "Applying pass %1 of %2 for %3 filter...", "1", numPassesRequired, GetNameOfEdgeDetector(edgeDetectionType) 'Use PD's central image handler to populate the public workingDIB object. - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'Create a second DIB copy. This will receive the edge-detection copy of the image. diff --git a/Forms/Effects_Edge_FindEdges.frm b/Forms/Effects_Edge_FindEdges.frm index ef8ec8f5a0..c8b6e7cf26 100644 --- a/Forms/Effects_Edge_FindEdges.frm +++ b/Forms/Effects_Edge_FindEdges.frm @@ -117,7 +117,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Edge Detection Interface -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 1/11/02 'Last updated: 30/July/17 'Last update: performance improvements, migrate to XML params @@ -166,7 +166,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Find edges", , GetLocalParamString(), UNDO_LAYER + Process "Find edges", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() @@ -236,7 +236,7 @@ Public Sub ApplyEdgeDetection(ByVal effectParams As String, Optional ByVal toPre 'Create a local array and point it at the pixel data of the current image. Note that the current layer is referred to as the ' DESTINATION image for the convolution; we will make a separate temp copy of the image to use as the SOURCE. - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference @@ -529,7 +529,7 @@ Private Sub FilterSmoothContour(Optional ByVal blackBackground As Boolean = Fals If (Not toPreview) Then Message "Tracing image edges with virtual paintbrush..." 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference diff --git a/Forms/Effects_Edge_Range.frm b/Forms/Effects_Edge_Range.frm index 242df961e3..93728942a7 100644 --- a/Forms/Effects_Edge_Range.frm +++ b/Forms/Effects_Edge_Range.frm @@ -100,7 +100,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Range filter edge detection tool -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 23/November/15 'Last updated: 23/November/15 'Last update: initial build @@ -140,7 +140,7 @@ Public Sub ApplyRangeFilter(ByVal parameterList As String, Optional ByVal toPrev 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 diff --git a/Forms/Effects_Edge_TraceContour.frm b/Forms/Effects_Edge_TraceContour.frm index fc0968c1e7..4d6a74e80d 100644 --- a/Forms/Effects_Edge_TraceContour.frm +++ b/Forms/Effects_Edge_TraceContour.frm @@ -84,7 +84,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Trace Contour (Outline) Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 15/Feb/13 'Last updated: 30/July/17 'Last update: performance improvements, migrate to XML params @@ -125,7 +125,7 @@ Public Sub TraceContour(ByVal effectParams As String, Optional ByVal toPreview A End With 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference @@ -184,7 +184,7 @@ Public Sub TraceContour(ByVal effectParams As String, Optional ByVal toPreview A End Sub Private Sub cmdBar_OKClick() - Process "Trace contour", , GetLocalParamString(), UNDO_LAYER + Process "Trace contour", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_LightAndShadow_Blacklight.frm b/Forms/Effects_LightAndShadow_Blacklight.frm index bb26dbbfaf..fed083f23a 100644 --- a/Forms/Effects_LightAndShadow_Blacklight.frm +++ b/Forms/Effects_LightAndShadow_Blacklight.frm @@ -64,7 +64,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Blacklight Form -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: some time 2001 'Last updated: 01/October/13 'Last update: use a floating-point slider for more precise results @@ -94,7 +94,7 @@ Public Sub fxBlackLight(ByVal effectParams As String, Optional ByVal toPreview A 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 @@ -171,7 +171,7 @@ Public Sub fxBlackLight(ByVal effectParams As String, Optional ByVal toPreview A End Sub Private Sub cmdBar_OKClick() - Process "Black light", , GetLocalParamString, UNDO_LAYER + Process "Black light", , GetLocalParamString, UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_LightAndShadow_CrossScreen.frm b/Forms/Effects_LightAndShadow_CrossScreen.frm index 6f7890907b..bec207aca9 100644 --- a/Forms/Effects_LightAndShadow_CrossScreen.frm +++ b/Forms/Effects_LightAndShadow_CrossScreen.frm @@ -131,7 +131,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Cross-Screen (Star) Tool -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 20/January/15 'Last updated: 30/July/17 'Last update: performance improvements, migrate to XML params diff --git a/Forms/Effects_LightAndShadow_Rainbow.frm b/Forms/Effects_LightAndShadow_Rainbow.frm index 0dbb7a293e..3e2f7c86d9 100644 --- a/Forms/Effects_LightAndShadow_Rainbow.frm +++ b/Forms/Effects_LightAndShadow_Rainbow.frm @@ -98,7 +98,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Rainbow Effect dialog -'Copyright 2003-2017 by Tanner Helland +'Copyright 2003-2018 by Tanner Helland 'Created: sometime 2003 'Last updated: 01/August/17 'Last update: performance improvements, migrate to XML params @@ -141,7 +141,7 @@ Public Sub ApplyRainbowEffect(ByVal effectParams As String, Optional ByVal toPre 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 @@ -268,7 +268,7 @@ Public Sub ApplyRainbowEffect(ByVal effectParams As String, Optional ByVal toPre End Sub Private Sub cmdBar_OKClick() - Process "Rainbow", , GetLocalParamString(), UNDO_LAYER + Process "Rainbow", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_LightAndShadow_Sunshine.frm b/Forms/Effects_LightAndShadow_Sunshine.frm index 2fd59a4035..278871a75b 100644 --- a/Forms/Effects_LightAndShadow_Sunshine.frm +++ b/Forms/Effects_LightAndShadow_Sunshine.frm @@ -223,7 +223,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Sunshine Effect Form -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 31/July/17 'Created: 01/August/17 'Last update: finish work on new implementation @@ -278,7 +278,7 @@ Public Sub fxSunshine(ByVal effectParams As String, Optional ByVal toPreview As End With 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic, , , True 'If this is a preview, we need to adjust the radius to match the size of the preview box @@ -305,7 +305,7 @@ Public Sub fxSunshine(ByVal effectParams As String, Optional ByVal toPreview As m_RayOverlay.ResetDIB 0 End If - Dim pxOverlay() As Byte, pxSA As SAFEARRAY1D + Dim pxOverlay() As Byte, pxSA As SafeArray1D 'Local loop variables can be more efficiently cached by VB's compiler, so we transfer all relevant loop data here Dim x As Long, y As Long, initX As Long, initY As Long, finalX As Long, finalY As Long diff --git a/Forms/Effects_Nature_Atmosphere.frm b/Forms/Effects_Nature_Atmosphere.frm index 0b4016d601..96dc92d3d7 100644 --- a/Forms/Effects_Nature_Atmosphere.frm +++ b/Forms/Effects_Nature_Atmosphere.frm @@ -83,7 +83,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Nature > "Atmosphere" Effect Form -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: some time 2001 'Last updated: 03/August/17 'Last update: expand function into full-featured dialog @@ -121,7 +121,7 @@ Public Sub ApplyAtmosphereEffect(ByVal effectParams As String, Optional ByVal to 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D, tmpSA1D As SAFEARRAY1D + Dim tmpSA As SafeArray2D, tmpSA1D As SafeArray1D EffectPrep.PrepImageData tmpSA, toPreview, dstPic 'Create a copy of the working data diff --git a/Forms/Effects_Nature_Fog.frm b/Forms/Effects_Nature_Fog.frm index 7e8ca28186..c17b1dd960 100644 --- a/Forms/Effects_Nature_Fog.frm +++ b/Forms/Effects_Nature_Fog.frm @@ -122,7 +122,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Fog Effect -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: 8/April/02 'Last updated: 03/August/17 'Last update: migrate to XML params, minor performance improvements diff --git a/Forms/Effects_Nature_Ignite.frm b/Forms/Effects_Nature_Ignite.frm index b0b1713e5d..8b9fd1df87 100644 --- a/Forms/Effects_Nature_Ignite.frm +++ b/Forms/Effects_Nature_Ignite.frm @@ -94,7 +94,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** '"Burn" Fire FX Form -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: some time 2001 'Last updated: 03/August/17 'Last update: migrate to XML params, performance improvements @@ -141,7 +141,7 @@ Public Sub fxBurn(ByVal effectParams As String, Optional ByVal toPreview As Bool 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D, tmpSA1D As SAFEARRAY1D + Dim tmpSA As SafeArray2D, tmpSA1D As SafeArray1D EffectPrep.PrepImageData tmpSA, toPreview, dstPic 'Radius is simply a proportion of the current image's height @@ -310,7 +310,7 @@ Public Sub fxBurn(ByVal effectParams As String, Optional ByVal toPreview As Bool End Sub Private Sub cmdBar_OKClick() - Process "Ignite", , GetLocalParamString(), UNDO_LAYER + Process "Ignite", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Nature_Lava.frm b/Forms/Effects_Nature_Lava.frm index fa8dee5f0c..1dd69e0812 100644 --- a/Forms/Effects_Nature_Lava.frm +++ b/Forms/Effects_Nature_Lava.frm @@ -103,7 +103,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Lava Effect -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: 8/April/02 'Last updated: 16/October/17 'Last update: rewrite using new algorithm; migrate to dedicated UI instance diff --git a/Forms/Effects_Nature_Metal.frm b/Forms/Effects_Nature_Metal.frm index e75ecf4dd3..6d4af1aaa5 100644 --- a/Forms/Effects_Nature_Metal.frm +++ b/Forms/Effects_Nature_Metal.frm @@ -100,7 +100,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** '"Metal" or "Chrome" Image effect -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: sometime 2002 'Last updated: 16/October/17 'Last update: migrate the actual function code elsewhere; it's helpful in other filter scenarios diff --git a/Forms/Effects_Nature_Snow.frm b/Forms/Effects_Nature_Snow.frm index ed17803f7a..7428b62986 100644 --- a/Forms/Effects_Nature_Snow.frm +++ b/Forms/Effects_Nature_Snow.frm @@ -129,7 +129,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Nature > "Snow" Effect Dialog -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 03/August/17 'Last updated: 04/August/17 'Last update: wrap up initial build @@ -179,7 +179,7 @@ Public Sub ApplySnowEffect(ByVal effectParams As String, Optional ByVal toPrevie End With 'Generate a source image matching the current preview area - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic, , , True 'Local loop variables can be more efficiently cached by VB's compiler, so we transfer all relevant loop data here @@ -259,8 +259,8 @@ Public Sub ApplySnowEffect(ByVal effectParams As String, Optional ByVal toPrevie Dim centerX As Double, centerY As Double Dim ptAngle As Single - Dim shapeCorners() As POINTFLOAT - ReDim shapeCorners(0 To 3) As POINTFLOAT + Dim shapeCorners() As PointFloat + ReDim shapeCorners(0 To 3) As PointFloat If (Not toPreview) Then ProgressBars.SetProgBarVal 1 diff --git a/Forms/Effects_Nature_Water.frm b/Forms/Effects_Nature_Water.frm index 99f684bb41..d52e1bf9bd 100644 --- a/Forms/Effects_Nature_Water.frm +++ b/Forms/Effects_Nature_Water.frm @@ -107,7 +107,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image "Underwater" Effect -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 01/January/2001? 'Last updated: 18/October/17 'Last update: created dedicated UI, expose more options to the user diff --git a/Forms/Effects_Noise_AddRGBNoise.frm b/Forms/Effects_Noise_AddRGBNoise.frm index 09a8a4cbc9..029fe1fd51 100644 --- a/Forms/Effects_Noise_AddRGBNoise.frm +++ b/Forms/Effects_Noise_AddRGBNoise.frm @@ -86,7 +86,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image Noise Interface -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 15/March/01 'Last updated: 07/August/17 'Last update: large performance and quality improvements, Gaussian noise option, convert to XML params @@ -121,7 +121,7 @@ Public Sub AddNoise(ByVal effectParams As String, Optional ByVal toPreview As Bo 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 @@ -244,7 +244,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Add RGB noise", , GetLocalParamString(), UNDO_LAYER + Process "Add RGB noise", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Noise_Anisotropic.frm b/Forms/Effects_Noise_Anisotropic.frm index 39de46b77d..063a54fa1c 100644 --- a/Forms/Effects_Noise_Anisotropic.frm +++ b/Forms/Effects_Noise_Anisotropic.frm @@ -111,7 +111,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Anisotropic Diffusion dialog -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 11/December/15 'Last updated: 11/December/15 'Last update: initial build @@ -204,7 +204,7 @@ Public Sub ApplyAnisotropicDiffusion(ByVal parameterList As String, Optional ByV 'Create a local array and point it at the destination pixel data Dim dstImageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(tmpSA), 4 @@ -215,7 +215,7 @@ Public Sub ApplyAnisotropicDiffusion(ByVal parameterList As String, Optional ByV srcDIB.CreateFromExistingDIB workingDIB Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D PrepSafeArray srcSA, srcDIB CopyMemory ByVal VarPtrArray(srcImageData()), VarPtr(srcSA), 4 @@ -491,7 +491,7 @@ Private Sub btsEmphasis_Click(ByVal buttonIndex As Long) End Sub Private Sub cmdBar_OKClick() - Process "Anisotropic diffusion", , GetLocalParamString(), UNDO_LAYER + Process "Anisotropic diffusion", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Noise_BilateralFilter.frm b/Forms/Effects_Noise_BilateralFilter.frm index 34ab1ae431..f26cd4b3e6 100644 --- a/Forms/Effects_Noise_BilateralFilter.frm +++ b/Forms/Effects_Noise_BilateralFilter.frm @@ -133,7 +133,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Bilateral Smoothing Form -'Copyright 2014-2017 by Tanner Helland, first build Copyright 2014 by Audioglider +'Copyright 2014-2018 by Tanner Helland, first build Copyright 2014 by Audioglider 'Created: 19/June/14 'Last updated: 02/August/17 'Last update: migrate to XML params, minor performance improvements @@ -256,14 +256,14 @@ Public Sub BilateralSmoothing(ByVal effectParams As String, Optional ByVal toPre 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent already-processed pixels from affecting the results of later pixels.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D 'If this is a preview, we need to adjust the kernal If toPreview Then kernelRadius = kernelRadius * curDIBValues.previewModifier @@ -433,7 +433,7 @@ Public Sub BilateralSmoothingSeparable(ByVal effectParams As String, Optional By End With 'PrepImageData generates a working copy of the current filter target - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'If this is a preview, we need to adjust kernel size to match @@ -469,7 +469,7 @@ Private Sub chkSeparable_Click() End Sub Private Sub cmdBar_OKClick() - Process "Bilateral smoothing", , GetLocalParamString(), UNDO_LAYER + Process "Bilateral smoothing", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Noise_FilmGrain.frm b/Forms/Effects_Noise_FilmGrain.frm index 08030eab54..e21c491c7d 100644 --- a/Forms/Effects_Noise_FilmGrain.frm +++ b/Forms/Effects_Noise_FilmGrain.frm @@ -78,7 +78,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Add Film Grain Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 31/January/13 'Last updated: 07/August/17 'Last update: convert to XML params, large performance improvements @@ -111,7 +111,7 @@ Public Sub AddFilmGrain(ByVal effectParams As String, Optional ByVal toPreview A End With 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic, , , True 'Local loop variables can be more efficiently cached by VB's compiler, so we transfer all relevant loop data here @@ -194,7 +194,7 @@ Public Sub AddFilmGrain(ByVal effectParams As String, Optional ByVal toPreview A End Sub Private Sub cmdBar_OKClick() - Process "Add film grain", , GetLocalParamString(), UNDO_LAYER + Process "Add film grain", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Noise_HarmonicMean.frm b/Forms/Effects_Noise_HarmonicMean.frm index 5260a93039..da1befc04c 100644 --- a/Forms/Effects_Noise_HarmonicMean.frm +++ b/Forms/Effects_Noise_HarmonicMean.frm @@ -90,7 +90,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Harmonic mean Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 27/July/17 'Last updated: 27/July/17 'Last update: initial build @@ -128,7 +128,7 @@ Public Sub ApplyHarmonicMean(ByVal parameterList As String, Optional ByVal toPre 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 diff --git a/Forms/Effects_Noise_MeanShift.frm b/Forms/Effects_Noise_MeanShift.frm index 5e01baeadd..1391b78182 100644 --- a/Forms/Effects_Noise_MeanShift.frm +++ b/Forms/Effects_Noise_MeanShift.frm @@ -88,7 +88,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Mean Shift Effect Tool -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 02/October/15 'Last updated: 08/December/15 'Last update: convert to the new pdPixelIterator class @@ -124,7 +124,7 @@ Public Sub ApplyMeanShiftFilter(ByVal parameterList As String, Optional ByVal to 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 @@ -325,7 +325,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Mean shift", , GetLocalParamString(), UNDO_LAYER + Process "Mean shift", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Noise_MedianSmoothing.frm b/Forms/Effects_Noise_MedianSmoothing.frm index eb3fc59a4c..65f7cdee4d 100644 --- a/Forms/Effects_Noise_MedianSmoothing.frm +++ b/Forms/Effects_Noise_MedianSmoothing.frm @@ -89,7 +89,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Median Filter Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 08/Feb/13 'Last updated: 23/August/13 'Last update: added a mode-tracking variable to help with the new command bar addition @@ -145,7 +145,7 @@ Public Sub ApplyMedianFilter(ByVal parameterList As String, Optional ByVal toPre End If 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'If this is a preview, we need to adjust the kernel radius to match the size of the preview box @@ -175,7 +175,7 @@ Private Sub btsKernelShape_Click(ByVal buttonIndex As Long) End Sub Private Sub cmdBar_OKClick() - Process "Median", , GetLocalParamString(), UNDO_LAYER + Process "Median", , GetLocalParamString(), UNDO_Layer End Sub 'Because this dialog can be used for multiple tools, we need to clarify some behavior when resetting and randomizing diff --git a/Forms/Effects_Pixelate_ColorHalftone.frm b/Forms/Effects_Pixelate_ColorHalftone.frm index 827b9efa21..7bf4f3a4d0 100644 --- a/Forms/Effects_Pixelate_ColorHalftone.frm +++ b/Forms/Effects_Pixelate_ColorHalftone.frm @@ -122,7 +122,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Color Halftone Effect Interface -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 01/April/15 'Last updated: 01/April/15 'Last update: initial build @@ -167,7 +167,7 @@ Public Sub ColorHalftoneFilter(ByVal effectParams As String, Optional ByVal toPr End With 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference @@ -191,7 +191,7 @@ Public Sub ColorHalftoneFilter(ByVal effectParams As String, Optional ByVal toPr End Sub Private Sub cmdBar_OKClick() - Process "Color halftone", , GetLocalParamString(), UNDO_LAYER + Process "Color halftone", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Pixelate_Crystallize.frm b/Forms/Effects_Pixelate_Crystallize.frm index 759e4cf922..a08882e470 100644 --- a/Forms/Effects_Pixelate_Crystallize.frm +++ b/Forms/Effects_Pixelate_Crystallize.frm @@ -99,7 +99,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Crystallize Effect Interface -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 14/July/14 'Last updated: 08/April/17 'Last update: convert to XML params, performance improvements @@ -151,7 +151,7 @@ Public Sub fxCrystallize(ByVal effectParams As String, Optional ByVal toPreview 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic, , , True CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 diff --git a/Forms/Effects_Pixelate_Fragment.frm b/Forms/Effects_Pixelate_Fragment.frm index fc97210ffa..89f32b3254 100644 --- a/Forms/Effects_Pixelate_Fragment.frm +++ b/Forms/Effects_Pixelate_Fragment.frm @@ -117,7 +117,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Fragment Filter Dialog -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 01/August/17 'Last updated: 01/August/17 'Last update: complete rewrite using new, original algorithm. (Performance increase is ~20x over the old method, @@ -153,7 +153,7 @@ Public Sub Fragment(ByVal effectParams As String, Optional ByVal toPreview As Bo End With 'Request a working copy of the current layer - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic, , , True 'Make a copy of said working data @@ -209,7 +209,7 @@ Public Sub Fragment(ByVal effectParams As String, Optional ByVal toPreview As Bo Set cTransform = New pd2DTransform cTransform.ApplyTranslation_Polar startingAngle, fragmentDistance, True - Dim topLeft As POINTFLOAT + Dim topLeft As PointFloat 'Starting at the user's specified initial angle, superimpose copies of the image at the specified intervals Dim i As Long diff --git a/Forms/Effects_Pixelate_Mezzotint.frm b/Forms/Effects_Pixelate_Mezzotint.frm index b38c275027..f83d676e02 100644 --- a/Forms/Effects_Pixelate_Mezzotint.frm +++ b/Forms/Effects_Pixelate_Mezzotint.frm @@ -98,7 +98,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Mezzotint Effect Tool -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 03/April/15 'Last updated: 04/April/15 'Last update: wrap up initial build diff --git a/Forms/Effects_Pixelate_Mosaic.frm b/Forms/Effects_Pixelate_Mosaic.frm index 650afc8037..7259904afe 100644 --- a/Forms/Effects_Pixelate_Mosaic.frm +++ b/Forms/Effects_Pixelate_Mosaic.frm @@ -101,7 +101,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Pixelate/Mosaic filter interface -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 08/May/00 'Last updated: 08/August/17 'Last update: convert to XML params, minor performance improvements @@ -140,7 +140,7 @@ Public Sub MosaicFilter(ByVal effectParams As String, Optional ByVal toPreview A 'Grab a copy of the relevant pixel data from PD's main image data handler Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic, , , True 'Make a note of the original image's size; we need this so we can restore the image to its original angle after @@ -152,7 +152,7 @@ Public Sub MosaicFilter(ByVal effectParams As String, Optional ByVal toPreview A 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent already-mosaic'ed pixels from affecting the results of later pixels.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -322,7 +322,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Mosaic", , GetLocalParamString(), UNDO_LAYER + Process "Mosaic", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() @@ -342,7 +342,7 @@ Private Sub Form_Load() 'Note the current image's width and height, which will be needed to adjust the preview effect If pdImages(g_CurrentImage).IsSelectionActive Then - Dim selBounds As RECTF + Dim selBounds As RectF selBounds = pdImages(g_CurrentImage).MainSelection.GetBoundaryRect() sltWidth.Max = selBounds.Width sltHeight.Max = selBounds.Height diff --git a/Forms/Effects_Sharpen_Sharpen.frm b/Forms/Effects_Sharpen_Sharpen.frm index 60143f9539..bc0418cefe 100644 --- a/Forms/Effects_Sharpen_Sharpen.frm +++ b/Forms/Effects_Sharpen_Sharpen.frm @@ -64,7 +64,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Sharpen Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 09/August/13 (actually, a naive version was built years ago, but didn't offer variable strength) 'Last updated: 28/July/17 'Last update: performance improvements, migrate to XML params @@ -125,7 +125,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Sharpen", , GetLocalParamString(), UNDO_LAYER + Process "Sharpen", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Sharpen_UnsharpMask.frm b/Forms/Effects_Sharpen_UnsharpMask.frm index 98496e6732..0d54528d88 100644 --- a/Forms/Effects_Sharpen_UnsharpMask.frm +++ b/Forms/Effects_Sharpen_UnsharpMask.frm @@ -101,7 +101,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Unsharp Masking Tool -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 03/March/01 'Last updated: 27/July/17 'Last update: performance improvements, migrate to XML params @@ -149,7 +149,7 @@ Public Sub UnsharpMask(ByVal effectParams As String, Optional ByVal toPreview As umThreshold = umThreshold \ 5 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference @@ -203,8 +203,8 @@ Public Sub UnsharpMask(ByVal effectParams As String, Optional ByVal toPreview As If (gaussBlurSuccess <> 0) Then 'Now that we have a gaussian DIB created in workingDIB, we can point arrays toward it and the source DIB - Dim dstImageData() As Byte, dstSA1D As SAFEARRAY1D - Dim srcImageData() As Byte, srcSA1D As SAFEARRAY1D + Dim dstImageData() As Byte, dstSA1D As SafeArray1D + Dim srcImageData() As Byte, srcSA1D As SafeArray1D 'These values will help us access locations in the array more quickly. ' (qvDepth is required because the image array may be 24 or 32 bits per pixel, and we want to handle both cases.) diff --git a/Forms/Effects_Stylize_Antique.frm b/Forms/Effects_Stylize_Antique.frm index 233942199a..0604d90536 100644 --- a/Forms/Effects_Stylize_Antique.frm +++ b/Forms/Effects_Stylize_Antique.frm @@ -106,7 +106,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Antique Effect -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 03/July/12 'Last updated: 19/October/17 'Last update: rework algorithm with a full UI and user-controllable params diff --git a/Forms/Effects_Stylize_Diffuse.frm b/Forms/Effects_Stylize_Diffuse.frm index 12c011b16f..d9a3bb1146 100644 --- a/Forms/Effects_Stylize_Diffuse.frm +++ b/Forms/Effects_Stylize_Diffuse.frm @@ -88,7 +88,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Diffuse Filter Handler -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 8/14/01 'Last updated: 08/August/17 'Last update: migrate to XML params, large performance improvements @@ -108,7 +108,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Diffuse", , GetLocalParamString(), UNDO_LAYER + Process "Diffuse", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() @@ -155,7 +155,7 @@ Public Sub DiffuseCustom(ByVal effectParams As String, Optional ByVal toPreview yDiffuseRatio = 0.01 * yDiffuseRatio 'Create a local array and point it at the pixel data of the current image - Dim dstImageData() As Long, dstSA As SAFEARRAY2D + Dim dstImageData() As Long, dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic, , , True workingDIB.WrapLongArrayAroundDIB dstImageData, dstSA @@ -165,7 +165,7 @@ Public Sub DiffuseCustom(ByVal effectParams As String, Optional ByVal toPreview Set srcDIB = New pdDIB srcDIB.CreateFromExistingDIB workingDIB - Dim srcImageData() As Long, srcSA As SAFEARRAY2D + Dim srcImageData() As Long, srcSA As SafeArray2D srcDIB.WrapLongArrayAroundDIB srcImageData, srcSA 'Local loop variables can be more efficiently cached by VB's compiler, so we transfer all relevant loop data here diff --git a/Forms/Effects_Stylize_Outline.frm b/Forms/Effects_Stylize_Outline.frm index 3053c4bf41..982cbd67fb 100644 --- a/Forms/Effects_Stylize_Outline.frm +++ b/Forms/Effects_Stylize_Outline.frm @@ -94,7 +94,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image Outline Effect Dialog -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 05/January/17 'Last updated: 01/August/17 'Last update: fix potential OOB error on "alpha" edge mode @@ -147,7 +147,7 @@ Public Sub ApplyOutlineEffect(ByVal parameterList As String, Optional ByVal toPr 'For now, transparency is the only way to define an image edge. Use the passed threshold to generate ' a 1bpp array that we can pass to the edge detector. Dim srcImageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic, , , CBool(edgeType = 0) CopyMemory ByVal VarPtrArray(srcImageData()), VarPtr(tmpSA), 4 diff --git a/Forms/Effects_Stylize_Palettize.frm b/Forms/Effects_Stylize_Palettize.frm index 395579d0fb..3a2d93a201 100644 --- a/Forms/Effects_Stylize_Palettize.frm +++ b/Forms/Effects_Stylize_Palettize.frm @@ -184,7 +184,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** '"Palettize" (e.g. reduce image color count) Dialog -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 4/October/00 'Last updated: 11/September/17 'Last update: update default quality mode (via pdMedianCut) @@ -388,7 +388,7 @@ Public Sub ApplyPalettizeEffect(ByVal toolParams As String, Optional ByVal toPre Dim alphaCutoff As Long alphaCutoff = cParams.GetLong("alphacutoff", 64) - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, pdFxPreview If (Not toPreview) Then @@ -424,7 +424,7 @@ Public Sub ApplyPalettizeEffect(ByVal toolParams As String, Optional ByVal toPre 'Branch according to internal or plugin-based quantization methods. Note that if the user does *NOT* want ' dithering, we can use the plugin to apply the palette as well, trimming processing time a bit. - Dim finalPalette() As RGBQUAD, finalPaletteCount As Long + Dim finalPalette() As RGBQuad, finalPaletteCount As Long If (quantMethod = PDCQ_MedianCut) Then @@ -484,7 +484,7 @@ Public Sub ApplyPalettizeEffect(ByVal toolParams As String, Optional ByVal toPre 'Retrieve the generated palette, then free the FreeImage source finalPaletteCount = Plugin_FreeImage.GetFreeImagePalette(fi_DIB8, finalPalette) - ReDim Preserve finalPalette(0 To paletteSize - 1) As RGBQUAD + ReDim Preserve finalPalette(0 To paletteSize - 1) As RGBQuad FreeImage_Unload fi_DIB8 'Preserve black and white, as necessary diff --git a/Forms/Effects_Stylize_PortraitGlow.frm b/Forms/Effects_Stylize_PortraitGlow.frm index 2e10bff42f..0b39e49b17 100644 --- a/Forms/Effects_Stylize_PortraitGlow.frm +++ b/Forms/Effects_Stylize_PortraitGlow.frm @@ -98,7 +98,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Portrait glow (sometimes called "soft glow") image effect -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 20/Dec/15 'Last updated: 20/Dec/15 'Last update: initial build @@ -133,7 +133,7 @@ Public Sub ApplyPortraitGlow(ByVal parameterList As String, Optional ByVal toPre If (Not toPreview) Then Message "Applying petroleum jelly to camera lens..." 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'Create a copy of the image. "Portrait glow" requires a blurred image copy as part of the effect, and we maintain diff --git a/Forms/Effects_Stylize_Solarize.frm b/Forms/Effects_Stylize_Solarize.frm index 7be4bda41d..a216fd481f 100644 --- a/Forms/Effects_Stylize_Solarize.frm +++ b/Forms/Effects_Stylize_Solarize.frm @@ -64,7 +64,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Solarizing Effect Handler -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 4/14/01 'Last updated: 08/August/17 'Last update: migrate to XML params, performance improvements @@ -96,7 +96,7 @@ Public Sub SolarizeImage(ByVal effectParams As String, Optional ByVal toPreview 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 diff --git a/Forms/Effects_Stylize_Twins.frm b/Forms/Effects_Stylize_Twins.frm index cbcc31ae64..2ced8c1aa4 100644 --- a/Forms/Effects_Stylize_Twins.frm +++ b/Forms/Effects_Stylize_Twins.frm @@ -62,7 +62,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** '"Twin" Filter Interface -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 6/12/01 'Last updated: 08/August/17 'Last update: migrate to XML params, minor performance improvements @@ -93,14 +93,14 @@ Public Sub GenerateTwins(ByVal effectParams As String, Optional ByVal toPreview 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic, , , True CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent already-processed pixels from affecting the results of later pixels.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -194,7 +194,7 @@ Private Sub btsOrientation_Click(ByVal buttonIndex As Long) End Sub Private Sub cmdBar_OKClick() - Process "Twins", , GetLocalParamString(), UNDO_LAYER + Process "Twins", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Stylize_Vignette.frm b/Forms/Effects_Stylize_Vignette.frm index 6af63c1522..134ad48058 100644 --- a/Forms/Effects_Stylize_Vignette.frm +++ b/Forms/Effects_Stylize_Vignette.frm @@ -200,7 +200,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image Vignette tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 31/January/13 'Last updated: 27/February/17 'Last update: large performance improvements; added "custom shape" mode @@ -246,7 +246,7 @@ Public Sub ApplyVignette(ByVal vignetteParams As String, Optional ByVal toPrevie 'Prep a working copy of the source image, and note that we leave the color data premultiplied. ' (We're only going to be blending atop the source, so we don't need to un-premultiply it.) Dim dstImageData() As Long - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic, , , True Dim x As Long, y As Long, initX As Long, initY As Long, finalX As Long, finalY As Long @@ -336,7 +336,7 @@ Public Sub ApplyVignette(ByVal vignetteParams As String, Optional ByVal toPrevie ' fast to apply. Dim vLookup() As Long ReDim vLookup(0 To 255) As Long - Dim tmpQuad As RGBQUAD + Dim tmpQuad As RGBQuad 'Extract the RGB values of the vignetting color Dim newR As Byte, newG As Byte, newB As Byte diff --git a/Forms/Effects_Transform_PanZoom.frm b/Forms/Effects_Transform_PanZoom.frm index 9b72cd7a8f..b88e51d080 100644 --- a/Forms/Effects_Transform_PanZoom.frm +++ b/Forms/Effects_Transform_PanZoom.frm @@ -116,7 +116,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Pan and Zoom Effect Interface -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 28/May/13 'Last updated: 27/July/17 'Last update: performance improvements, migrate to XML params @@ -156,14 +156,14 @@ Public Sub PanAndZoomFilter(ByVal effectParams As String, Optional ByVal toPrevi 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -363,7 +363,7 @@ Public Sub PanAndZoomFilter(ByVal effectParams As String, Optional ByVal toPrevi End Sub Private Sub cmdBar_OKClick() - Process "Pan and zoom", , GetLocalParamString(), UNDO_LAYER + Process "Pan and zoom", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() @@ -383,7 +383,7 @@ Private Sub Form_Load() 'Note the current image's width and height, which will be needed to adjust the preview effect Dim iWidth As Long, iHeight As Long If pdImages(g_CurrentImage).IsSelectionActive Then - Dim selBounds As RECTF + Dim selBounds As RectF selBounds = pdImages(g_CurrentImage).MainSelection.GetBoundaryRect() iWidth = selBounds.Width iHeight = selBounds.Height diff --git a/Forms/Effects_Transform_Perspective.frm b/Forms/Effects_Transform_Perspective.frm index 716a48e6bb..28b0b03237 100644 --- a/Forms/Effects_Transform_Perspective.frm +++ b/Forms/Effects_Transform_Perspective.frm @@ -101,7 +101,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image Perspective Distortion -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 08/April/13 'Last updated: 26/July/17 'Last update: performance improvements, migrate to XML params @@ -142,8 +142,8 @@ Private m_srcDIB As pdDIB 'We track two sets of control point coordinates - the original points, and the new points. The difference between ' these is passed to the perspective function. -Private m_oPoints(0 To 3) As POINTFLOAT -Private m_nPoints(0 To 3) As POINTFLOAT +Private m_oPoints(0 To 3) As PointFloat +Private m_nPoints(0 To 3) As PointFloat 'Track mouse status between MouseDown and MouseMove events Private m_isMouseDown As Boolean @@ -170,14 +170,14 @@ Public Sub PerspectiveImage(ByVal effectParams As String, Optional ByVal toPrevi 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent translated pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D If (m_srcDIB Is Nothing) Then Set m_srcDIB = New pdDIB m_srcDIB.CreateFromExistingDIB workingDIB @@ -604,7 +604,7 @@ Private Sub Form_Load() 'Note the current image's width and height, which is needed to map between the on-screen interactive UI area, ' and the final transform. - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, True, pdFxPreview, , , True m_PreviewWidth = curDIBValues.Width m_PreviewHeight = curDIBValues.Height @@ -677,7 +677,7 @@ Private Sub RedrawPreviewBox() Next i Else If cmdBar.PreviewsAllowed Then - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, True, pdFxPreview StretchBlt picDraw.hDC, m_oPoints(0).x, m_oPoints(0).y, m_oPoints(1).x - m_oPoints(0).x, m_oPoints(2).y - m_oPoints(0).y, workingDIB.GetDIBDC, 0, 0, workingDIB.GetDIBWidth, workingDIB.GetDIBHeight, vbSrcCopy End If diff --git a/Forms/Effects_Transform_PolarCoords.frm b/Forms/Effects_Transform_PolarCoords.frm index 352fb7dcc8..b308871d32 100644 --- a/Forms/Effects_Transform_PolarCoords.frm +++ b/Forms/Effects_Transform_PolarCoords.frm @@ -107,7 +107,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image Polar Coordinate Conversion Tool -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 14/January/13 'Last updated: 28/July/17 'Last update: performance improvements, migrate to XML params @@ -167,7 +167,7 @@ Public Sub ConvertToPolar(ByVal effectParams As String, Optional ByVal toPreview End With 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference @@ -192,7 +192,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Polar conversion", , GetLocalParamString(), UNDO_LAYER + Process "Polar conversion", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Transform_Rotate.frm b/Forms/Effects_Transform_Rotate.frm index 96457057f6..f4f29e04f5 100644 --- a/Forms/Effects_Transform_Rotate.frm +++ b/Forms/Effects_Transform_Rotate.frm @@ -153,7 +153,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Rotate Distort Effect Interface (separate from image rotation for a reason - see below) -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 22/August/13 'Last updated: 28/July/17 'Last update: performance improvements, migrate to XML params @@ -198,7 +198,7 @@ Public Sub RotateFilter(ByVal effectParams As String, Optional ByVal toPreview A End With 'Create a local array and point it at the pixel data of the current image - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference @@ -218,7 +218,7 @@ Public Sub RotateFilter(ByVal effectParams As String, Optional ByVal toPreview A End Sub Private Sub cmdBar_OKClick() - Process "Rotate", , GetLocalParamString(), UNDO_LAYER + Process "Rotate", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Transform_Shear.frm b/Forms/Effects_Transform_Shear.frm index f31543cf14..bde8179e68 100644 --- a/Forms/Effects_Transform_Shear.frm +++ b/Forms/Effects_Transform_Shear.frm @@ -103,7 +103,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image Shear Distortion -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 03/April/13 'Last updated: 28/July/17 'Last update: performance improvements, migrate to XML params @@ -146,14 +146,14 @@ Public Sub ShearImage(ByVal effectParams As String, Optional ByVal toPreview As 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -326,7 +326,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Shear", , GetLocalParamString(), UNDO_LAYER + Process "Shear", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/Effects_Transform_Sphere.frm b/Forms/Effects_Transform_Sphere.frm index 6c40444cfa..5018b4853e 100644 --- a/Forms/Effects_Transform_Sphere.frm +++ b/Forms/Effects_Transform_Sphere.frm @@ -126,7 +126,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image "Spherize" Distortion -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 05/June/13 'Last updated: 28/July/17 'Last update: performance improvements, migrate to XML params @@ -187,14 +187,14 @@ Public Sub SpherizeImage(ByVal effectParams As String, Optional ByVal toPreview 'Create a local array and point it at the pixel data of the current image Dim dstImageData() As Byte - Dim dstSA As SAFEARRAY2D + Dim dstSA As SafeArray2D EffectPrep.PrepImageData dstSA, toPreview, dstPic CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(dstSA), 4 'Create a second local array. This will contain the a copy of the current image, and we will use it as our source reference ' (This is necessary to prevent diffused pixels from spreading across the image as we go.) Dim srcImageData() As Byte - Dim srcSA As SAFEARRAY2D + Dim srcSA As SafeArray2D Dim srcDIB As pdDIB Set srcDIB = New pdDIB @@ -450,7 +450,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Spherize", , GetLocalParamString(), UNDO_LAYER + Process "Spherize", , GetLocalParamString(), UNDO_Layer End Sub Private Sub cmdBar_RequestPreviewUpdate() diff --git a/Forms/File_BatchRepair.frm b/Forms/File_BatchRepair.frm index 25ebe99752..c5c92d4fff 100644 --- a/Forms/File_BatchRepair.frm +++ b/Forms/File_BatchRepair.frm @@ -198,7 +198,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Batch Repair dialog -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 16/August/16 'Last updated: 18/August/16 'Last update: add video repair capabilities diff --git a/Forms/File_BatchWizard.frm b/Forms/File_BatchWizard.frm index 1a162ec398..7a1b3ec92a 100644 --- a/Forms/File_BatchWizard.frm +++ b/Forms/File_BatchWizard.frm @@ -695,7 +695,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Batch Conversion Form -'Copyright 2007-2017 by Tanner Helland +'Copyright 2007-2018 by Tanner Helland 'Created: 3/Nov/07 'Last updated: 09/September/16 'Last update: complete overhaul of UI and underlying logic diff --git a/Forms/File_Import_FromInternet.frm b/Forms/File_Import_FromInternet.frm index b7ba22714e..00667848b3 100644 --- a/Forms/File_Import_FromInternet.frm +++ b/Forms/File_Import_FromInternet.frm @@ -74,7 +74,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Internet Interface (for importing images directly from a URL) -'Copyright 2011-2017 by Tanner Helland +'Copyright 2011-2018 by Tanner Helland 'Created: 08/June/12 'Last updated: 03/December/12 'Last update: made some slight modifications to ImportImageFromInternet so it can be used by external callers. diff --git a/Forms/File_Import_Multipage.frm b/Forms/File_Import_Multipage.frm index 5316940635..1f89b9f4b0 100644 --- a/Forms/File_Import_Multipage.frm +++ b/Forms/File_Import_Multipage.frm @@ -76,7 +76,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Multi-Image Load Dialog -'Copyright 2011-2017 by Tanner Helland +'Copyright 2011-2018 by Tanner Helland 'Created: 01/December/12 'Last updated: 27/December/12 'Last update: add support for icon files, which may contain many embedded icons. diff --git a/Forms/File_Import_ScreenCapture.frm b/Forms/File_Import_ScreenCapture.frm index 228c23fc18..28344fb3ba 100644 --- a/Forms/File_Import_ScreenCapture.frm +++ b/Forms/File_Import_ScreenCapture.frm @@ -165,7 +165,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Custom Screen Capture Dialog -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 01/January/12 (approx) 'Last updated: 15/January/14 'Last update: minor bugfixes to account for delays caused by window animations diff --git a/Forms/File_New.frm b/Forms/File_New.frm index e9136b0848..ad98b0d8b7 100644 --- a/Forms/File_New.frm +++ b/Forms/File_New.frm @@ -124,7 +124,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'New Image Dialog -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 29/December/14 'Last updated: 31/December/14 'Last update: wrap up initial build @@ -210,7 +210,7 @@ Private Sub CalculateDefaultSize() Dim pDisplay As pdDisplay Set pDisplay = g_Displays.PrimaryDisplay - Dim pDisplayRect As RECTL + Dim pDisplayRect As RectL If (Not pDisplay Is Nothing) Then pDisplay.GetRect pDisplayRect Else diff --git a/Forms/File_PrintModern.frm b/Forms/File_PrintModern.frm index 2f8b6160bf..dc45b3abc0 100644 --- a/Forms/File_PrintModern.frm +++ b/Forms/File_PrintModern.frm @@ -388,7 +388,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Combined Print / Print Preview Interface -'Copyright 2003-2017 by Tanner Helland +'Copyright 2003-2018 by Tanner Helland 'Created: 4/April/03 'Last updated: 12/November/13 'Last update: rewritten from scratch. Literally. @@ -423,7 +423,7 @@ Private Sub cmbPrinter_Click() UpdatePaperSizeList End Sub -Private Sub CmdCancel_Click() +Private Sub cmdCancel_Click() Unload Me End Sub diff --git a/Forms/File_PrintXP.frm b/Forms/File_PrintXP.frm index 8979da93f0..c236c44de7 100644 --- a/Forms/File_PrintXP.frm +++ b/Forms/File_PrintXP.frm @@ -187,7 +187,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Printer Interface (including Print Preview) -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 4/April/03 'Last updated: 22/September/17 'Last update: emergency fixes to restore printing support on XP. Some features were stripped to enable compatibility diff --git a/Forms/File_Save_BMP.frm b/Forms/File_Save_BMP.frm index b25e9026a3..ac87e28c93 100644 --- a/Forms/File_Save_BMP.frm +++ b/Forms/File_Save_BMP.frm @@ -171,7 +171,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Bitmap export dialog -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 11/December/12 'Last updated: 11/August/17 'Last update: dynamically reflow visible controls as panels are changed, and hide settings specific to @@ -577,7 +577,7 @@ Private Sub UpdatePreviewSource() 'Because the user can change the preview viewport, we can't guarantee that the preview region hasn't changed ' since the last preview. Prep a new preview now. - Dim tmpSafeArray As SAFEARRAY2D + Dim tmpSafeArray As SafeArray2D EffectPrep.PreviewNonStandardImage tmpSafeArray, m_CompositedImage, pdFxPreview, True 'Convert the DIB to a FreeImage-compatible handle, at a color-depth that matches the current settings. diff --git a/Forms/File_Save_GIF.frm b/Forms/File_Save_GIF.frm index d38321a7f9..5c8c700a1f 100644 --- a/Forms/File_Save_GIF.frm +++ b/Forms/File_Save_GIF.frm @@ -184,7 +184,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'GIF export dialog -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 11/December/12 'Last updated: 11/April/16 'Last update: repurpose old color-depth dialog into a GIF-specific one @@ -482,7 +482,7 @@ Private Sub UpdatePreviewSource() 'Because the user can change the preview viewport, we can't guarantee that the preview region hasn't changed ' since the last preview. Prep a new preview now. - Dim tmpSafeArray As SAFEARRAY2D + Dim tmpSafeArray As SafeArray2D EffectPrep.PreviewNonStandardImage tmpSafeArray, m_CompositedImage, pdFxPreview, True 'Convert the DIB to a FreeImage-compatible handle, at a color-depth that matches the current settings. diff --git a/Forms/File_Save_JP2Settings.frm b/Forms/File_Save_JP2Settings.frm index 49b9f3bb9f..7255e49789 100644 --- a/Forms/File_Save_JP2Settings.frm +++ b/Forms/File_Save_JP2Settings.frm @@ -152,7 +152,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'JPEG-2000 (JP2) Export Dialog -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 04/December/12 'Last updated: 07/May/16 'Last update: convert dialog to new export engine @@ -367,7 +367,7 @@ Private Sub UpdatePreviewSource() 'Because the user can change the preview viewport, we can't guarantee that the preview region hasn't changed ' since the last preview. Prep a new preview now. - Dim tmpSafeArray As SAFEARRAY2D + Dim tmpSafeArray As SafeArray2D EffectPrep.PreviewNonStandardImage tmpSafeArray, m_CompositedImage, pdFxPreview, False 'Finally, convert that preview copy to a FreeImage-compatible handle. diff --git a/Forms/File_Save_JPEGSettings.frm b/Forms/File_Save_JPEGSettings.frm index 4df4bcb038..18ecbd44cf 100644 --- a/Forms/File_Save_JPEGSettings.frm +++ b/Forms/File_Save_JPEGSettings.frm @@ -174,7 +174,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'JPEG Export Dialog -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 5/8/00 'Last updated: 11/August/17 'Last update: hide the background color selector if the current image doesn't contain transparency diff --git a/Forms/File_Save_JXRSettings.frm b/Forms/File_Save_JXRSettings.frm index c29bc30e81..62ffde0020 100644 --- a/Forms/File_Save_JXRSettings.frm +++ b/Forms/File_Save_JXRSettings.frm @@ -162,7 +162,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'JPEG XR Export Dialog -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 14/February/14 'Last updated: 07/May/16 'Last update: convert dialog to new export engine @@ -379,7 +379,7 @@ Private Sub UpdatePreviewSource() 'Because the user can change the preview viewport, we can't guarantee that the preview region hasn't changed ' since the last preview. Prep a new preview now. - Dim tmpSafeArray As SAFEARRAY2D + Dim tmpSafeArray As SafeArray2D EffectPrep.PreviewNonStandardImage tmpSafeArray, m_CompositedImage, pdFxPreview, False 'Finally, convert that preview copy to a FreeImage-compatible handle. diff --git a/Forms/File_Save_PNG.frm b/Forms/File_Save_PNG.frm index 9d1b40615e..83a0568b7f 100644 --- a/Forms/File_Save_PNG.frm +++ b/Forms/File_Save_PNG.frm @@ -408,7 +408,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PNG export dialog -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 11/December/12 'Last updated: 15/March/17 'Last update: finally solve (I hope?) persistent layout reflow issues @@ -678,7 +678,7 @@ Private Sub cmdUpdateLossyPreview_Click() 'Because the user can change the preview viewport, we can't guarantee that the preview region hasn't changed ' since the last preview. Prep a new preview now. - Dim tmpSafeArray As SAFEARRAY2D + Dim tmpSafeArray As SafeArray2D EffectPrep.PreviewNonStandardImage tmpSafeArray, m_CompositedImage, pdFxPreview, False 'Create a FreeImage copy of the current preview image @@ -789,7 +789,7 @@ Private Sub UpdatePreviewSource() 'Because the user can change the preview viewport, we can't guarantee that the preview region hasn't changed ' since the last preview. Prep a new preview now. - Dim tmpSafeArray As SAFEARRAY2D + Dim tmpSafeArray As SafeArray2D EffectPrep.PreviewNonStandardImage tmpSafeArray, m_CompositedImage, pdFxPreview, True 'To reduce the chance of bugs, we use the same parameter parsing technique as the core PNG encoder diff --git a/Forms/File_Save_Pixmap.frm b/Forms/File_Save_Pixmap.frm index a187ec62a3..65fb294746 100644 --- a/Forms/File_Save_Pixmap.frm +++ b/Forms/File_Save_Pixmap.frm @@ -101,7 +101,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Portable Pixmap Export Dialog -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 01/May/16 'Last updated: 11/August/17 'Last update: improve flow of export dialog (by auto-hiding the background color selector when the source @@ -358,7 +358,7 @@ Private Sub UpdatePreviewSource() 'Because the user can change the preview viewport, we can't guarantee that the preview region hasn't changed ' since the last preview. Prep a new preview now. - Dim tmpSafeArray As SAFEARRAY2D + Dim tmpSafeArray As SafeArray2D EffectPrep.PreviewNonStandardImage tmpSafeArray, m_CompositedImage, pdFxPreview, True 'PNM formats don't support transparency, so we can save some time by forcibly converting to 24-bpp in advance diff --git a/Forms/File_Save_TIFF.frm b/Forms/File_Save_TIFF.frm index 882e189811..82342457e1 100644 --- a/Forms/File_Save_TIFF.frm +++ b/Forms/File_Save_TIFF.frm @@ -171,7 +171,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'TIFF export dialog -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 11/December/12 'Last updated: 29/April/16 'Last update: repurpose old color-depth dialog into a TIFF-specific one @@ -428,7 +428,7 @@ Private Sub UpdatePreviewSource() 'Because the user can change the preview viewport, we can't guarantee that the preview region hasn't changed ' since the last preview. Prep a new preview now. - Dim tmpSafeArray As SAFEARRAY2D + Dim tmpSafeArray As SafeArray2D EffectPrep.PreviewNonStandardImage tmpSafeArray, m_CompositedImage, pdFxPreview, True 'To reduce the chance of bugs, we use the same parameter parsing technique as the core TIFF encoder diff --git a/Forms/File_Save_WebPSettings.frm b/Forms/File_Save_WebPSettings.frm index f5fea9a5ec..da81a532ad 100644 --- a/Forms/File_Save_WebPSettings.frm +++ b/Forms/File_Save_WebPSettings.frm @@ -113,7 +113,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Google WebP Export Dialog -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 14/February/14 'Last updated: 09/May/16 'Last update: convert dialog to new export engine @@ -314,7 +314,7 @@ Private Sub UpdatePreviewSource() 'Because the user can change the preview viewport, we can't guarantee that the preview region hasn't changed ' since the last preview. Prep a new preview now. - Dim tmpSafeArray As SAFEARRAY2D + Dim tmpSafeArray As SafeArray2D EffectPrep.PreviewNonStandardImage tmpSafeArray, m_CompositedImage, pdFxPreview, False 'Finally, convert that preview copy to a FreeImage-compatible handle. diff --git a/Forms/Help_About.frm b/Forms/Help_About.frm index 44c3af7c0b..0b3b325604 100644 --- a/Forms/Help_About.frm +++ b/Forms/Help_About.frm @@ -182,7 +182,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon About Dialog -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 6/12/01 'Last updated: 14/June/17 'Last update: update contributor list @@ -221,10 +221,6 @@ Private Sub UpdateVisiblePanel() Next i End Sub -Private Sub CmdOK_Click() - Unload Me -End Sub - Private Sub Form_Load() lstContributors.ListItemHeight = FixDPI(BLOCKHEIGHT) @@ -235,8 +231,8 @@ Private Sub Form_Load() UpdateVisiblePanel 'Fill any custom "About" panel text - lblAbout(0).Caption = g_Language.TranslateMessage("PhotoDemon is Copyright %1 2001-2017 by Tanner Helland and Contributors", ChrW$(169)) - lblAbout(1).Caption = GetPhotoDemonNameAndVersion() + lblAbout(0).Caption = g_Language.TranslateMessage("PhotoDemon is Copyright %1 2001-2018 by Tanner Helland and Contributors", ChrW$(169)) + lblAbout(1).Caption = Updates.GetPhotoDemonNameAndVersion() 'Fill the "Contributor" panel text ReDim m_contributorList(0 To 31) As PD_Contributor diff --git a/Forms/Image_CanvasSize.frm b/Forms/Image_CanvasSize.frm index e52f952866..10b67c49a6 100644 --- a/Forms/Image_CanvasSize.frm +++ b/Forms/Image_CanvasSize.frm @@ -152,7 +152,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Canvas Size Handler -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 13/June/13 'Last updated: 09/January/17 'Last update: overhaul anchor point code to use arrows rendered at run-time (instead of fixed resources) @@ -268,7 +268,7 @@ End Sub 'OK button Private Sub cmdBar_OKClick() - Process "Canvas size", , GetCurrentParams, UNDO_IMAGEHEADER + Process "Canvas size", , GetCurrentParams, UNDO_ImageHeader End Sub Private Function GetCurrentParams() As String @@ -364,7 +364,7 @@ Public Sub ResizeCanvas(ByVal functionParams As String) 'If the image contains an active selection, disable it before transforming the canvas If pdImages(g_CurrentImage).IsSelectionActive Then pdImages(g_CurrentImage).SetSelectionActive False - pdImages(g_CurrentImage).mainSelection.LockRelease + pdImages(g_CurrentImage).MainSelection.LockRelease End If 'Based on the anchor position, determine x and y locations for the image on the new canvas diff --git a/Forms/Image_ContentAwareResize.frm b/Forms/Image_ContentAwareResize.frm index f2d456f1cf..d9d918640d 100644 --- a/Forms/Image_ContentAwareResize.frm +++ b/Forms/Image_ContentAwareResize.frm @@ -64,7 +64,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Content-Aware Resize (e.g. "content-aware scale" in Photoshop, "liquid rescale" in GIMP) Dialog -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 06/January/14 'Last updated: 29/July/14 'Last update: fixed some 32bpp issues, added serpentine scanning for ideal treatment of images on uniform backgrounds @@ -123,9 +123,9 @@ Private Sub cmdBar_OKClick() End With If (m_ResizeTarget = PD_AT_WHOLEIMAGE) Then - Process "Content-aware image resize", , cParams.GetParamString(), UNDO_IMAGE + Process "Content-aware image resize", , cParams.GetParamString(), UNDO_Image ElseIf (m_ResizeTarget = PD_AT_SINGLELAYER) Then - Process "Content-aware layer resize", , cParams.GetParamString(), UNDO_LAYER + Process "Content-aware layer resize", , cParams.GetParamString(), UNDO_Layer End If End Sub @@ -265,7 +265,7 @@ Public Sub SmartResizeImage(ByVal xmlParams As String) 'Flatten the image; note that we route this through the central processor, so that a proper Undo/Redo entry ' is created. (This is especially important if the user presses ESC to cancel the seam-carving step.) - Process "Flatten image", , , UNDO_IMAGE + Process "Flatten image", , , UNDO_Image End If @@ -292,7 +292,7 @@ Public Sub SmartResizeImage(ByVal xmlParams As String) Set tmpDIB = Nothing 'Notify the parent of the change - pdImages(g_CurrentImage).NotifyImageChanged UNDO_LAYER, pdImages(g_CurrentImage).GetActiveLayerIndex + pdImages(g_CurrentImage).NotifyImageChanged UNDO_Layer, pdImages(g_CurrentImage).GetActiveLayerIndex 'Update the main image's size and DPI values as necessary If thingToResize = PD_AT_WHOLEIMAGE Then diff --git a/Forms/Image_Metadata.frm b/Forms/Image_Metadata.frm index fd83aa0bb3..b66e6b703b 100644 --- a/Forms/Image_Metadata.frm +++ b/Forms/Image_Metadata.frm @@ -289,7 +289,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Image Metadata Browser -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 27/May/13 'Last updated: 08/April/16 'Last update: mass overhaul in conjunction with building the Metadata Editor dialog diff --git a/Forms/Image_Resize.frm b/Forms/Image_Resize.frm index 263adb057a..9d9fda0a47 100644 --- a/Forms/Image_Resize.frm +++ b/Forms/Image_Resize.frm @@ -120,7 +120,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image Size Handler -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 6/12/01 'Last updated: 23/April/17 'Last update: finally work on a much-needed code cleanup diff --git a/Forms/Image_Rotate.frm b/Forms/Image_Rotate.frm index dc49ad3acb..eddfeaeb69 100644 --- a/Forms/Image_Rotate.frm +++ b/Forms/Image_Rotate.frm @@ -104,7 +104,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image Rotation Interface -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 12/November/12 'Last updated: 06/June/16 'Last update: total overhaul to improve performance, quality, and feature set. FreeImage is no longer involved. @@ -279,7 +279,7 @@ Public Sub RotateArbitrary(ByVal rotationParameters As String, Optional ByVal is End If 'Notify the parent of the change - pdImages(g_CurrentImage).NotifyImageChanged UNDO_LAYER, i + pdImages(g_CurrentImage).NotifyImageChanged UNDO_Layer, i 'Continue with the next layer Next i @@ -328,10 +328,10 @@ Private Sub cmdBar_OKClick() Select Case m_RotateTarget Case PD_AT_WHOLEIMAGE - Process "Arbitrary image rotation", , GetFunctionParamString(), UNDO_IMAGE + Process "Arbitrary image rotation", , GetFunctionParamString(), UNDO_Image Case PD_AT_SINGLELAYER - Process "Arbitrary layer rotation", , GetFunctionParamString(), UNDO_LAYER + Process "Arbitrary layer rotation", , GetFunctionParamString(), UNDO_Layer End Select @@ -428,7 +428,7 @@ Private Sub Form_Load() Case PD_AT_WHOLEIMAGE - Dim dstRectF As RECTF, srcRectF As RECTF + Dim dstRectF As RectF, srcRectF As RectF With dstRectF .Left = 0# .Top = 0# diff --git a/Forms/Image_Straighten.frm b/Forms/Image_Straighten.frm index a5f8062a9e..525e8225a8 100644 --- a/Forms/Image_Straighten.frm +++ b/Forms/Image_Straighten.frm @@ -65,7 +65,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Image Straightening Interface -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 11/May/14 'Last updated: 11/May/14 'Last update: initial build, based heavily off PD's existing Rotate dialog @@ -151,7 +151,7 @@ Public Sub StraightenImage(ByVal processParameters As String, Optional ByVal isP Dim cTransform As pd2DTransform Set cTransform = New pd2DTransform - Dim rotatePoints() As POINTFLOAT + Dim rotatePoints() As PointFloat 'Normally, I like to use identical code for previews and actual effects. However, rotating is completely different ' for previews (where we do a single rotation of the composited image) vs the full images (independently rotating @@ -288,7 +288,7 @@ Public Sub StraightenImage(ByVal processParameters As String, Optional ByVal isP If (thingToRotate = PD_AT_WHOLEIMAGE) Then tmpLayerRef.CropNullPaddedLayer 'Notify the parent of the change - pdImages(g_CurrentImage).NotifyImageChanged UNDO_LAYER, i + pdImages(g_CurrentImage).NotifyImageChanged UNDO_Layer, i 'Continue with the next layer Next i @@ -317,9 +317,9 @@ Private Sub cmdBar_OKClick() Select Case m_StraightenTarget Case PD_AT_WHOLEIMAGE - Process "Straighten image", , GetLocalParamString(), UNDO_IMAGE + Process "Straighten image", , GetLocalParamString(), UNDO_Image Case PD_AT_SINGLELAYER - Process "Straighten layer", , GetLocalParamString(), UNDO_LAYER + Process "Straighten layer", , GetLocalParamString(), UNDO_Layer End Select End Sub @@ -375,7 +375,7 @@ Private Sub Form_Load() Case PD_AT_WHOLEIMAGE - Dim dstRectF As RECTF, srcRectF As RECTF + Dim dstRectF As RectF, srcRectF As RectF With dstRectF .Left = 0# .Top = 0# diff --git a/Forms/Layer_Add_RasterLayer.frm b/Forms/Layer_Add_RasterLayer.frm index ab46b5fd28..385457d558 100644 --- a/Forms/Layer_Add_RasterLayer.frm +++ b/Forms/Layer_Add_RasterLayer.frm @@ -167,7 +167,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'New Layer dialog -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 08/June/14 'Last updated: 09/July/14 'Last update: added option for position and auto-selecting new layer diff --git a/Forms/Layer_Flatten.frm b/Forms/Layer_Flatten.frm index ae653e90f8..eda48a162f 100644 --- a/Forms/Layer_Flatten.frm +++ b/Forms/Layer_Flatten.frm @@ -62,7 +62,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Flatten Image Dialog -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 20/May/16 'Last updated: 20/May/16 'Last update: provide dialog for setting flatten options @@ -101,7 +101,7 @@ Private Sub cmdBar_OKClick() .AddParam "backgroundcolor", clsBackground.Color End With - Process "Flatten image", , cParams.GetParamString, UNDO_IMAGE + Process "Flatten image", , cParams.GetParamString, UNDO_Image End Sub diff --git a/Forms/Layer_Transparency_GreenScreen.frm b/Forms/Layer_Transparency_GreenScreen.frm index 9cee65297c..174464b40f 100644 --- a/Forms/Layer_Transparency_GreenScreen.frm +++ b/Forms/Layer_Transparency_GreenScreen.frm @@ -88,7 +88,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Make color transparent ("green screen") tool dialog -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 13/August/13 'Last updated: 10/June/16 'Last update: add a LittleCMS path for the algorithm; this improves performance by ~30% diff --git a/Forms/Layer_Transparency_RemoveTransparency.frm b/Forms/Layer_Transparency_RemoveTransparency.frm index ff9130859e..cfc3e4bb6e 100644 --- a/Forms/Layer_Transparency_RemoveTransparency.frm +++ b/Forms/Layer_Transparency_RemoveTransparency.frm @@ -60,7 +60,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Convert image to 24bpp (remove alpha channel) interface -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 14/June/13 'Last updated: 14/June/13 'Last update: initial build diff --git a/Forms/Layerpanel_Colors.frm b/Forms/Layerpanel_Colors.frm index c7154a0439..ae9fcf5ee2 100644 --- a/Forms/Layerpanel_Colors.frm +++ b/Forms/Layerpanel_Colors.frm @@ -50,7 +50,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Color Selector Tool Panel -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 15/October/15 'Last updated: 20/October/15 'Last update: actually implement color selection controls! diff --git a/Forms/Layerpanel_Layers.frm b/Forms/Layerpanel_Layers.frm index 6ccdcb5497..6302f7b4a4 100644 --- a/Forms/Layerpanel_Layers.frm +++ b/Forms/Layerpanel_Layers.frm @@ -169,7 +169,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Layer Tool Panel -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 25/March/14 'Last updated: 25/September/15 'Last update: split into its own subpanel, so we can stick more cool stuff on the right panel. diff --git a/Forms/Layerpanel_Navigator.frm b/Forms/Layerpanel_Navigator.frm index d4f64d0e64..39270301e1 100644 --- a/Forms/Layerpanel_Navigator.frm +++ b/Forms/Layerpanel_Navigator.frm @@ -41,7 +41,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Navigation/Overview Tool Panel -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 15/October/15 'Last updated: 15/October/15 'Last update: initial build @@ -146,7 +146,7 @@ Private Sub nvgMain_RequestUpdatedThumbnail(ByRef thumbDIB As pdDIB, ByRef thumb thumbY = 0! End If - Dim dstRectF As RECTF + Dim dstRectF As RectF With dstRectF .Left = thumbX .Top = thumbY diff --git a/Forms/MainWindow.frm b/Forms/MainWindow.frm index d86e1e4ba6..1ae3766dd3 100644 --- a/Forms/MainWindow.frm +++ b/Forms/MainWindow.frm @@ -1553,13 +1553,13 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False 'Please see the included README.txt file for additional information regarding licensing and redistribution. -'PhotoDemon is Copyright 1999-2017 by Tanner Helland, tannerhelland.com +'PhotoDemon is Copyright 1999-2018 by Tanner Helland, tannerhelland.com 'Please visit photodemon.org for updates and additional downloads '*************************************************************************** 'Primary PhotoDemon Window -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: 15/September/02 'Last updated: 26/October/17 'Last update: add hotkey handling for tool selection diff --git a/Forms/Misc_Tooltip.frm b/Forms/Misc_Tooltip.frm index 293a0744b5..cd712742fa 100644 --- a/Forms/Misc_Tooltip.frm +++ b/Forms/Misc_Tooltip.frm @@ -39,7 +39,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Tooltip replacement window -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 21/September/16 'Last updated: 21/September/16 'Last update: initial build diff --git a/Forms/Select_GenericModification.frm b/Forms/Select_GenericModification.frm index 7515718713..9c819d72f6 100644 --- a/Forms/Select_GenericModification.frm +++ b/Forms/Select_GenericModification.frm @@ -57,7 +57,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Multi-purpose Selection Dialog -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 11/July/13 'Last updated: 11/July/13 'Last update: initial build diff --git a/Forms/Startup_Splash.frm b/Forms/Startup_Splash.frm index afbcc862b8..2ba4db69b1 100644 --- a/Forms/Startup_Splash.frm +++ b/Forms/Startup_Splash.frm @@ -39,7 +39,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Splash Screen -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 15/April/01 'Last updated: 02/September/17 'Last update: handle paint messages internally, rather than leaning on AutoRedraw @@ -51,8 +51,8 @@ Attribute VB_Exposed = False Option Explicit -Private Declare Function GetWindowRect Lib "user32" (ByVal hWnd As Long, ByRef lpRect As RECTL) As Long -Private Declare Function GetClientRect Lib "user32" (ByVal hWnd As Long, ByRef lpRect As RECTL) As Long +Private Declare Function GetWindowRect Lib "user32" (ByVal hWnd As Long, ByRef lpRect As RectL) As Long +Private Declare Function GetClientRect Lib "user32" (ByVal hWnd As Long, ByRef lpRect As RectL) As Long 'A logo, drop shadow and screen backdrop are used to generate the splash. These DIBs are released once m_splashDIB (below) ' has been successfully assembled. @@ -109,7 +109,7 @@ Public Sub PrepareRestOfSplash() 'Use the GetDesktopAsDIB function to retrieve a copy of the current screen. We will use this to mimic window ' transparency. (It's faster, and works more smoothly than attempting to use layered Windows, especially on XP.) - Dim captureRect As RECTL + Dim captureRect As RectL GetWindowRect Me.hWnd, captureRect ScreenCapture.GetPartialDesktopAsDIB m_splashDIB, captureRect diff --git a/Forms/Toolbar_Layers.frm b/Forms/Toolbar_Layers.frm index 7f1deb8115..ad7d9af317 100644 --- a/Forms/Toolbar_Layers.frm +++ b/Forms/Toolbar_Layers.frm @@ -106,7 +106,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Right-side ("Layers") Toolbar -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 25/March/14 'Last updated: 30/September/15 'Last update: implement collapsible panels diff --git a/Forms/Toolbar_ToolOptionsContainer.frm b/Forms/Toolbar_ToolOptionsContainer.frm index f2b6c97528..d9835a155e 100644 --- a/Forms/Toolbar_ToolOptionsContainer.frm +++ b/Forms/Toolbar_ToolOptionsContainer.frm @@ -35,7 +35,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Tools Toolbox -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 03/October/13 'Last updated: 31/October/16 'Last update: minor code cleanup diff --git a/Forms/Toolbar_ToolSelect.frm b/Forms/Toolbar_ToolSelect.frm index 6ed69452f7..df9411cee8 100644 --- a/Forms/Toolbar_ToolSelect.frm +++ b/Forms/Toolbar_ToolSelect.frm @@ -352,7 +352,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Primary Toolbar -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 02/Oct/13 'Last updated: 26/October/17 'Last update: add hotkeys for tool selection diff --git a/Forms/Toolpanel_ColorPicker.frm b/Forms/Toolpanel_ColorPicker.frm index 6b7e160ca5..f8d8743dba 100644 --- a/Forms/Toolpanel_ColorPicker.frm +++ b/Forms/Toolpanel_ColorPicker.frm @@ -260,7 +260,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Color-Picker Tool Panel -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 02/Oct/13 'Last updated: 27/September/17 'Last update: finish repurposing the UI for the new color picker @@ -388,7 +388,7 @@ Public Sub NotifyCanvasXY(ByVal mouseButtonDown As Boolean, ByVal imgX As Single If (m_SampleDIB Is Nothing) Then Set m_SampleDIB = New pdDIB m_SampleDIB.CreateBlank sampleWidth, sampleHeight, 32, 0, 0 - Dim dstRectF As RECTF, srcRectF As RECTF + Dim dstRectF As RectF, srcRectF As RectF With dstRectF .Left = 0 .Top = 0 @@ -416,7 +416,7 @@ Public Sub NotifyCanvasXY(ByVal mouseButtonDown As Boolean, ByVal imgX As Single Dim layerX As Single, layerY As Single Drawing.ConvertImageCoordsToLayerCoords_Full pdImages(g_CurrentImage), pdImages(g_CurrentImage).GetActiveLayer, imgX, imgY, layerX, layerY - Dim srcRGBA As RGBQUAD + Dim srcRGBA As RGBQuad If Layers.GetRGBAPixelFromLayer(pdImages(g_CurrentImage).GetActiveLayerIndex, layerX, layerY, srcRGBA, False) Then 'A valid color was found! Fill our module-level color values. @@ -487,7 +487,7 @@ Private Sub FindAverageValues() xFinal = (m_SampleDIB.GetDIBWidth - 1) * 4 yFinal = m_SampleDIB.GetDIBHeight - 1 - Dim lineOfPixels() As Byte, tmpSA As SAFEARRAY1D + Dim lineOfPixels() As Byte, tmpSA As SafeArray1D m_SampleDIB.WrapArrayAroundScanline lineOfPixels, tmpSA, 0 Dim pxPtr As Long, pxWidth As Long diff --git a/Forms/Toolpanel_Eraser.frm b/Forms/Toolpanel_Eraser.frm index daffcff51d..c079a7a1d2 100644 --- a/Forms/Toolpanel_Eraser.frm +++ b/Forms/Toolpanel_Eraser.frm @@ -136,7 +136,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Eraser Tool Panel -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 31/Oct/16 'Last updated: 24/August/17 'Last update: first build (although most settings were copied over from the paintbrush tool) diff --git a/Forms/Toolpanel_Fill.frm b/Forms/Toolpanel_Fill.frm index 53f55b20ed..39d9e2bdc2 100644 --- a/Forms/Toolpanel_Fill.frm +++ b/Forms/Toolpanel_Fill.frm @@ -157,7 +157,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Bucket Fill Tool Panel -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 30/August/17 'Last updated: 04/September/17 'Last update: continued work on initial build diff --git a/Forms/Toolpanel_MoveSize.frm b/Forms/Toolpanel_MoveSize.frm index 9789da26ae..e822f6e557 100644 --- a/Forms/Toolpanel_MoveSize.frm +++ b/Forms/Toolpanel_MoveSize.frm @@ -295,7 +295,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Move/Size Tool Panel -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 02/Oct/13 'Last updated: 06/November/17 'Last update: improve the rate at which things like taskbar icons are refreshed during non-destructive modifications diff --git a/Forms/Toolpanel_Paintbrush.frm b/Forms/Toolpanel_Paintbrush.frm index aa702f498a..eb204c72ee 100644 --- a/Forms/Toolpanel_Paintbrush.frm +++ b/Forms/Toolpanel_Paintbrush.frm @@ -159,7 +159,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Paintbrush Tool Panel -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 31/Oct/16 'Last updated: 04/Nov/16 'Last update: ongoing work on initial build diff --git a/Forms/Toolpanel_Pencil.frm b/Forms/Toolpanel_Pencil.frm index fd3f0c250e..9cf85aa429 100644 --- a/Forms/Toolpanel_Pencil.frm +++ b/Forms/Toolpanel_Pencil.frm @@ -105,7 +105,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Basic Brush ("Pencil") Tool Panel -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 31/Oct/16 'Last updated: 21/December/16 'Last update: kill the "preview quality" UI, which was for debug purposes only diff --git a/Forms/Toolpanel_Selections.frm b/Forms/Toolpanel_Selections.frm index e4d8ff1cce..f9baff2771 100644 --- a/Forms/Toolpanel_Selections.frm +++ b/Forms/Toolpanel_Selections.frm @@ -590,7 +590,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Selection Tool Panel -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 02/Oct/13 'Last updated: 06/June/17 'Last update: allow selection property changes even if the current tool and shape don't match; however, these are diff --git a/Forms/Toolpanel_TextBasic.frm b/Forms/Toolpanel_TextBasic.frm index 1c7ae31cd7..ce9ed58392 100644 --- a/Forms/Toolpanel_TextBasic.frm +++ b/Forms/Toolpanel_TextBasic.frm @@ -310,7 +310,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Basic Text Tool Panel -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 02/Oct/13 'Last updated: 22/June/17 'Last update: large improvements to the way non-destructive actions interact with the Undo/Redo engine @@ -643,7 +643,7 @@ Private Sub lblConvertLayerConfirm_Click() 'Because of the way this warning panel is constructed, this label will not be visible unless a click is valid. pdImages(g_CurrentImage).GetActiveLayer.SetLayerType PDL_TEXT - pdImages(g_CurrentImage).NotifyImageChanged UNDO_LAYER, pdImages(g_CurrentImage).GetActiveLayerIndex + pdImages(g_CurrentImage).NotifyImageChanged UNDO_Layer, pdImages(g_CurrentImage).GetActiveLayerIndex 'Hide the warning panel and redraw both the viewport, and the UI (as new UI options may now be available) Me.UpdateAgainstCurrentLayer diff --git a/Forms/Toolpanel_Typography.frm b/Forms/Toolpanel_Typography.frm index fd7ac3950f..86be08fa29 100644 --- a/Forms/Toolpanel_Typography.frm +++ b/Forms/Toolpanel_Typography.frm @@ -784,7 +784,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Advanced Typography Tool Panel -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 02/Oct/13 'Last updated: 22/June/17 'Last update: large improvements to the way non-destructive actions interact with the Undo/Redo engine @@ -1441,7 +1441,7 @@ Private Sub lblConvertLayerConfirm_Click() 'Because of the way this warning panel is constructed, this label will not be visible unless a click is valid. pdImages(g_CurrentImage).GetActiveLayer.SetLayerType PDL_TYPOGRAPHY - pdImages(g_CurrentImage).NotifyImageChanged UNDO_LAYER, pdImages(g_CurrentImage).GetActiveLayerIndex + pdImages(g_CurrentImage).NotifyImageChanged UNDO_Layer, pdImages(g_CurrentImage).GetActiveLayerIndex 'Hide the warning panel and redraw both the viewport, and the UI (as new UI options may now be available) Me.UpdateAgainstCurrentLayer diff --git a/Forms/Tools_LanguageEditor.frm b/Forms/Tools_LanguageEditor.frm index 074f394ff3..c2f42879d6 100644 --- a/Forms/Tools_LanguageEditor.frm +++ b/Forms/Tools_LanguageEditor.frm @@ -550,7 +550,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Interactive Language (Translation) Editor -'Copyright 2013-2017 by Frank Donckers and Tanner Helland +'Copyright 2013-2018 by Frank Donckers and Tanner Helland 'Created: 28/August/13 'Last updated: 15/February/17 'Last update: attempt to improve titlecase handling diff --git a/Forms/Tools_Options.frm b/Forms/Tools_Options.frm index 61f2b05495..cdb822bc61 100644 --- a/Forms/Tools_Options.frm +++ b/Forms/Tools_Options.frm @@ -848,7 +848,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Program Preferences Handler -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: 8/November/02 'Last updated: 28/November/16 'Last update: overhaul a number of panels to reflect new program behavior in 7.0 diff --git a/Forms/Tools_PluginManager.frm b/Forms/Tools_PluginManager.frm index beb0941254..d5512d2aa2 100644 --- a/Forms/Tools_PluginManager.frm +++ b/Forms/Tools_PluginManager.frm @@ -253,7 +253,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'PhotoDemon Plugin Manager -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 21/December/12 'Last updated: 20/April/16 'Last update: overhaul the dialog so that it never needs to be updated against new plugins. (Instead, all settings diff --git a/Forms/Tools_ThemeEditor.frm b/Forms/Tools_ThemeEditor.frm index c278d887e7..42dafdf739 100644 --- a/Forms/Tools_ThemeEditor.frm +++ b/Forms/Tools_ThemeEditor.frm @@ -314,7 +314,7 @@ Attribute VB_PredeclaredId = True Attribute VB_Exposed = False '*************************************************************************** 'Resource editor dialog -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 22/August/16 'Last updated: 28/August/17 'Last update: added option to compress individual resources using the faster (but lower-compression) LZ4HC algorithm diff --git a/Interfaces/IMRUList.cls b/Interfaces/IMRUList.cls index 407b9bfd8b..d02472d437 100644 --- a/Interfaces/IMRUList.cls +++ b/Interfaces/IMRUList.cls @@ -13,7 +13,7 @@ Attribute VB_PredeclaredId = False Attribute VB_Exposed = False '*************************************************************************** 'IMRUList : Interface for Recent File (MRU) lists -'Copyright 2005-2017 by Raj Chaudhuri and Tanner Helland +'Copyright 2005-2018 by Raj Chaudhuri and Tanner Helland 'Created: 16/February/15 'Last updated: 17/February/15 'Last updated by: Raj diff --git a/LICENSE.md b/LICENSE.md index b587d44835..bf5fe2ae53 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -PhotoDemon is copyright © 2017 by Tanner Helland and Contributors. +PhotoDemon is copyright © 2018 by Tanner Helland and Contributors. PhotoDemon is released under a BSD license. A full copy of the BSD license is included below. @@ -23,7 +23,7 @@ Full text of PhotoDemon and third-party plugin licenses follow. **PhotoDemon license (BSD)** -PhotoDemon is Copyright (c) 2017, Tanner Helland and Contributors. +PhotoDemon is Copyright (c) 2018, Tanner Helland and Contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/Modules/AutosaveEngine.bas b/Modules/AutosaveEngine.bas index f0b504abc3..a5c3158651 100644 --- a/Modules/AutosaveEngine.bas +++ b/Modules/AutosaveEngine.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Autosaves" '*************************************************************************** 'Image Autosave Handler -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 18/January/14 'Last updated: 10/January/17 'Last update: update against latest 7.0 changes to imageID values diff --git a/Modules/BatchProcessor.bas b/Modules/BatchProcessor.bas index 66e09c79e3..cc751f483c 100644 --- a/Modules/BatchProcessor.bas +++ b/Modules/BatchProcessor.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Macros" '*************************************************************************** 'PhotoDemon Macro Interface -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 10/21/01 'Last updated: 14/July/17 'Last update: properly encapsulate macro tracking functions diff --git a/Modules/CanvasManager.bas b/Modules/CanvasManager.bas index ef5b34599b..3d2756a589 100644 --- a/Modules/CanvasManager.bas +++ b/Modules/CanvasManager.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "CanvasManager" '*************************************************************************** 'Image Canvas Handler (formerly Image Window Handler) -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: 11/29/02 'Last updated: 04/February/14 'Last update: rework all code to operate on Canvas user controls instead of standalone forms diff --git a/Modules/ColorManagement_ICM.bas b/Modules/ColorManagement_ICM.bas index fe34f3fc4b..f1a0f0a6d6 100644 --- a/Modules/ColorManagement_ICM.bas +++ b/Modules/ColorManagement_ICM.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "ColorManagement" '*************************************************************************** 'PhotoDemon ICC (International Color Consortium) Profile Support Module -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 05/November/13 'Last updated: 05/September/14 'Last update: tie the multiprofile transform quality to the new Color Management Performance preference @@ -725,7 +725,7 @@ End Sub 'Transform some region of a given DIB from the specified working space (or sRGB, if no index is supplied) to the current display space. ' Do not call this if you don't know what you're doing, as it is *not* reversible. -Public Sub ApplyDisplayColorManagement_RectF(ByRef srcDIB As pdDIB, ByRef srcRectF As RECTF, Optional ByVal srcWorkingSpaceIndex As Long = -1, Optional ByVal checkPremultiplication As Boolean = True) +Public Sub ApplyDisplayColorManagement_RectF(ByRef srcDIB As pdDIB, ByRef srcRectF As RectF, Optional ByVal srcWorkingSpaceIndex As Long = -1, Optional ByVal checkPremultiplication As Boolean = True) 'Note that this function does nothing if the display is not currently color managed If (Not srcDIB Is Nothing) And (m_DisplayCMMPolicy <> DCM_NoManagement) Then @@ -763,7 +763,7 @@ Public Sub ApplyDisplayColorManagement_SingleColor(ByVal srcColor As Long, ByRef 'Apply the transformation to the source color, with special handling if the source is a long created by VB's RGB() function If srcIsRGBLong Then - Dim tmpRGBASrc As RGBQUAD, tmpRGBADst As RGBQUAD + Dim tmpRGBASrc As RGBQuad, tmpRGBADst As RGBQuad With tmpRGBASrc .Alpha = 255 .Red = Colors.ExtractRed(srcColor) @@ -880,7 +880,7 @@ Public Function ConvertRGBUsingCustomEndpoints(ByRef srcDIB As pdDIB, ByVal RedX 'Next, calculate xyz triplets that correspond to the incoming RGB endpoints, using the same xyz to XYZ conversion as the white point. Dim Xr As Double, Yr As Double, Zr As Double Dim Xg As Double, Yg As Double, Zg As Double - Dim Xb As Double, Yb As Double, Zb As Double + Dim xb As Double, yb As Double, Zb As Double Xr = RedX / RedY Yr = 1 @@ -890,8 +890,8 @@ Public Function ConvertRGBUsingCustomEndpoints(ByRef srcDIB As pdDIB, ByVal RedX Yg = 1 Zg = (1 - GreenX - GreenY) / GreenY - Xb = BlueX / BlueY - Yb = 1 + xb = BlueX / BlueY + yb = 1 Zb = (1 - BlueX - BlueY) / BlueY 'Now comes the ugly stuff. We can think of the calculated XYZ values (for each of RGB) as a conversion matrix, which looks like this: @@ -912,10 +912,10 @@ Public Function ConvertRGBUsingCustomEndpoints(ByRef srcDIB As pdDIB, ByVal RedX srcMatrix(0, 0) = Xr srcMatrix(0, 1) = Xg - srcMatrix(0, 2) = Xb + srcMatrix(0, 2) = xb srcMatrix(1, 0) = Yr srcMatrix(1, 1) = Yg - srcMatrix(1, 2) = Yb + srcMatrix(1, 2) = yb srcMatrix(2, 0) = Zr srcMatrix(2, 1) = Zg srcMatrix(2, 2) = Zb @@ -936,10 +936,10 @@ Public Function ConvertRGBUsingCustomEndpoints(ByRef srcDIB As pdDIB, ByVal RedX ReDim mFinal(0 To 2, 0 To 2) As Double mFinal(0, 0) = Sr * Xr mFinal(0, 1) = Sg * Xg - mFinal(0, 2) = Sb * Xb + mFinal(0, 2) = Sb * xb mFinal(1, 0) = Sr * Yr mFinal(1, 1) = Sg * Yg - mFinal(1, 2) = Sb * Yb + mFinal(1, 2) = Sb * yb mFinal(2, 0) = Sr * Zr mFinal(2, 1) = Sg * Zg mFinal(2, 2) = Sb * Zb @@ -1011,7 +1011,7 @@ Public Function ConvertRGBUsingCustomEndpoints(ByRef srcDIB As pdDIB, ByVal RedX 'Create a local array and point it at the pixel data we want to operate on Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D PrepSafeArray tmpSA, srcDIB CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 diff --git a/Modules/ColorPicker.bas b/Modules/ColorPicker.bas index df7b029040..934fa5ff79 100644 --- a/Modules/ColorPicker.bas +++ b/Modules/ColorPicker.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "ColorPicker" '*************************************************************************** 'Color Picker Tool Manager -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 25/September/17 'Last updated: 27/September/17 'Last update: wrap up initial build diff --git a/Modules/Colors.bas b/Modules/Colors.bas index b760ca2834..4db1756b8f 100644 --- a/Modules/Colors.bas +++ b/Modules/Colors.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Colors" '*************************************************************************** 'Miscellaneous Color Functions -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 13/June/13 'Last updated: 13/August/13 'Last update: added XYZ and CieLAB color conversions diff --git a/Modules/Compression.bas b/Modules/Compression.bas index baacc4434a..965a1ede6b 100644 --- a/Modules/Compression.bas +++ b/Modules/Compression.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Compression" '*************************************************************************** 'Unified Compression Interface for PhotoDemon -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 02/December/16 'Last updated: 12/December/16 'Last update: add support for Windows Compression API, available on Win 8+ diff --git a/Modules/DialogManager.bas b/Modules/DialogManager.bas index 028e1bdfc4..952eec824c 100644 --- a/Modules/DialogManager.bas +++ b/Modules/DialogManager.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "DialogManager" '*************************************************************************** 'Custom Dialog Interface -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 30/November/12 'Last updated: 12/February/17 'Last update: add wrapper for "first-run" dialog diff --git a/Modules/DibSupport.bas b/Modules/DibSupport.bas index 66c3402967..a7f198e81d 100644 --- a/Modules/DibSupport.bas +++ b/Modules/DibSupport.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "DIBs" '*************************************************************************** 'DIB Support Functions -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 27/March/15 (though many of the individual functions are much older!) 'Last updated: 10/August/17 'Last update: new performance improvements, with a special focus on DIB functions called during startup diff --git a/Modules/Drawing.bas b/Modules/Drawing.bas index 56aa8a9a0c..1ad131b2fc 100644 --- a/Modules/Drawing.bas +++ b/Modules/Drawing.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Drawing" '*************************************************************************** 'PhotoDemon Drawing Routines -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 4/3/01 'Last updated: 01/December/12 'Last update: Added DrawSystemIcon function (previously used for only the "unsaved changes" dialog @@ -108,7 +108,7 @@ End Sub 'Draw a horizontal gradient to a specified DIB from x-position xLeft to xRight. Public Sub DrawHorizontalGradientToDIB(ByVal dstDIB As pdDIB, ByVal xLeft As Single, ByVal xRight As Single, ByVal colorLeft As Long, ByVal colorRight As Long) - Dim boundsRectF As RECTF + Dim boundsRectF As RectF With boundsRectF .Left = (xLeft - 1) .Width = (xRight - xLeft) + 2 @@ -174,7 +174,7 @@ Public Sub CreateAlphaCheckerboardDIB(ByRef srcDIB As pdDIB) Next x 'Point a temporary array directly at the source DIB's bitmap bits. - Dim srcImageData() As Byte, srcSA As SAFEARRAY2D + Dim srcImageData() As Byte, srcSA As SafeArray2D srcDIB.WrapArrayAroundDIB srcImageData, srcSA 'Fill the source DIB with the checkerboard pattern @@ -219,7 +219,7 @@ Public Function ConvertCanvasCoordsToImageCoords(ByRef srcCanvas As pdCanvas, By ' image is a poster sliding around behind it, the translate image rect contains the poster coordinates, ' relative to the window. What's great about this rect is that it's already accounted for scroll bars, ' so we can ignore their value(s) here. - Dim translatedImageRect As RECTF + Dim translatedImageRect As RectF srcImage.ImgViewport.GetImageRectTranslated translatedImageRect 'Translating the canvas coordinate pair back to the image is now easy. Subtract the top/left offset, @@ -256,7 +256,7 @@ Public Sub ConvertImageCoordsToCanvasCoords(ByRef srcCanvas As pdCanvas, ByRef s ' image is a poster sliding around behind it, the translate image rect contains the poster coordinates, ' relative to the window. What's great about this rect is that it's already accounted for scroll bars, ' so we can ignore their value(s) here. - Dim translatedImageRect As RECTF + Dim translatedImageRect As RectF srcImage.ImgViewport.GetImageRectTranslated translatedImageRect 'Translating the canvas coordinate pair back to the image is now easy. Add the top/left offset, @@ -268,7 +268,7 @@ Public Sub ConvertImageCoordsToCanvasCoords(ByRef srcCanvas As pdCanvas, ByRef s If forceInBounds Then 'Get a copy of the current viewport intersection rect, which determines bounds of this function - Dim vIntersectRect As RECTF + Dim vIntersectRect As RectF srcImage.ImgViewport.GetIntersectRectCanvas vIntersectRect If (canvasX < vIntersectRect.Left) Then canvasX = vIntersectRect.Left @@ -283,7 +283,7 @@ Public Sub ConvertImageCoordsToCanvasCoords(ByRef srcCanvas As pdCanvas, ByRef s End Sub 'Given a RectF containing image-space coordinates, produce a new RectF with coordinates translated to the specified viewport canvas. -Public Sub ConvertImageCoordsToCanvasCoords_RectF(ByRef srcCanvas As pdCanvas, ByRef srcImage As pdImage, ByRef srcRectF As RECTF, ByRef dstRectF As RECTF, Optional ByVal forceInBounds As Boolean = False) +Public Sub ConvertImageCoordsToCanvasCoords_RectF(ByRef srcCanvas As pdCanvas, ByRef srcImage As pdImage, ByRef srcRectF As RectF, ByRef dstRectF As RectF, Optional ByVal forceInBounds As Boolean = False) If (Not srcImage.ImgViewport Is Nothing) Then @@ -295,7 +295,7 @@ Public Sub ConvertImageCoordsToCanvasCoords_RectF(ByRef srcCanvas As pdCanvas, B ' image is a poster sliding around behind it, the translate image rect contains the poster coordinates, ' relative to the window. What's great about this rect is that it's already accounted for scroll bars, ' so we can ignore their value(s) here. - Dim translatedImageRect As RECTF + Dim translatedImageRect As RectF srcImage.ImgViewport.GetImageRectTranslated translatedImageRect 'Translating the canvas coordinate pair back to the image is now easy. Add the top/left offset, @@ -311,7 +311,7 @@ Public Sub ConvertImageCoordsToCanvasCoords_RectF(ByRef srcCanvas As pdCanvas, B If forceInBounds Then 'Get a copy of the current viewport intersection rect, which determines bounds of this function - Dim vIntersectRect As RECTF + Dim vIntersectRect As RectF srcImage.ImgViewport.GetIntersectRectCanvas vIntersectRect If (dstRectF.Left < vIntersectRect.Left) Then dstRectF.Left = vIntersectRect.Left @@ -433,7 +433,7 @@ Public Function ConvertImageCoordsToLayerCoords_Full(ByRef srcImage As pdImage, End Function 'Given an array of (x,y) pairs set in the current image's coordinate space, convert each pair to the supplied viewport canvas space. -Public Sub ConvertListOfImageCoordsToCanvasCoords(ByRef srcCanvas As pdCanvas, ByRef srcImage As pdImage, ByRef listOfPoints() As POINTFLOAT, Optional ByVal forceInBounds As Boolean = False) +Public Sub ConvertListOfImageCoordsToCanvasCoords(ByRef srcCanvas As pdCanvas, ByRef srcImage As pdImage, ByRef listOfPoints() As PointFloat, Optional ByVal forceInBounds As Boolean = False) If (srcImage.ImgViewport Is Nothing) Then Exit Sub @@ -445,12 +445,12 @@ Public Sub ConvertListOfImageCoordsToCanvasCoords(ByRef srcCanvas As pdCanvas, B ' image is a poster sliding around behind it, the translate image rect contains the poster coordinates, ' relative to the window. What's great about this rect is that it's already accounted for scroll bars, ' so we can ignore their value(s) here. - Dim translatedImageRect As RECTF + Dim translatedImageRect As RectF srcImage.ImgViewport.GetImageRectTranslated translatedImageRect 'If the caller wants the coordinates bound-checked, we also need to grab a copy of the viewport ' intersection rect, which controls boundaries - Dim vIntersectRect As RECTF + Dim vIntersectRect As RectF If forceInBounds Then srcImage.ImgViewport.GetIntersectRectCanvas vIntersectRect Dim canvasX As Double, canvasY As Double @@ -521,7 +521,7 @@ Public Sub GetTransformFromImageToCanvas(ByRef dstTransform As pd2DTransform, By ' image is a poster sliding around behind it, the translate image rect contains the poster coordinates, ' relative to the window. What's great about this rect is that it's already accounted for scroll bars, ' so we can ignore their value(s) here. - Dim translatedImageRect As RECTF + Dim translatedImageRect As RectF srcImage.ImgViewport.GetImageRectTranslated translatedImageRect 'Apply scaling for zoom @@ -557,7 +557,7 @@ Public Sub GetCanvasRectForLayer(ByVal layerIndex As Long, ByRef dstRect As RECT End Sub 'Same as above, but using floating-point values -Public Sub GetCanvasRectForLayerF(ByVal layerIndex As Long, ByRef dstRect As RECTF, Optional ByVal useCanvasModifiers As Boolean = False) +Public Sub GetCanvasRectForLayerF(ByVal layerIndex As Long, ByRef dstRect As RectF, Optional ByVal useCanvasModifiers As Boolean = False) Dim tmpX As Double, tmpY As Double @@ -584,8 +584,8 @@ Public Sub DrawLayerBoundaries(ByRef dstCanvas As pdCanvas, ByRef srcImage As pd ' mean this is no longer guaranteed. ' 'So instead of filling a rect, we must retrieve the four layer corner coordinates as floating-point pairs. - Dim layerCorners() As POINTFLOAT - ReDim layerCorners(0 To 3) As POINTFLOAT + Dim layerCorners() As PointFloat + ReDim layerCorners(0 To 3) As PointFloat srcLayer.GetLayerCornerCoordinates layerCorners @@ -619,8 +619,8 @@ Public Sub DrawLayerCornerNodes(ByRef dstCanvas As pdCanvas, ByRef srcImage As p ' mean this is no longer guaranteed. ' 'So instead of filling a rect, we must retrieve the four layer corner coordinates as floating-point pairs. - Dim layerCorners() As POINTFLOAT - ReDim layerCorners(0 To 3) As POINTFLOAT + Dim layerCorners() As PointFloat + ReDim layerCorners(0 To 3) As PointFloat srcLayer.GetLayerCornerCoordinates layerCorners @@ -665,8 +665,8 @@ End Sub Public Sub DrawLayerRotateNode(ByRef dstCanvas As pdCanvas, ByRef srcImage As pdImage, ByRef srcLayer As pdLayer, Optional ByVal curPOI As PD_PointOfInterest = poi_Undefined) 'Retrieve the layer rotate node position from the specified layer, and convert it into the canvas coordinate space - Dim layerRotateNodes() As POINTFLOAT - ReDim layerRotateNodes(0 To 4) As POINTFLOAT + Dim layerRotateNodes() As PointFloat + ReDim layerRotateNodes(0 To 4) As PointFloat srcLayer.GetLayerRotationNodeCoordinates layerRotateNodes Drawing.ConvertListOfImageCoordsToCanvasCoords dstCanvas, srcImage, layerRotateNodes, False @@ -711,7 +711,7 @@ Public Sub DrawLayerRotateNode(ByRef dstCanvas As pdCanvas, ByRef srcImage As pd rRadius = PDMath.DistanceTwoPoints(layerRotateNodes(0).x, layerRotateNodes(0).y, layerRotateNodes(curPOI).x, layerRotateNodes(curPOI).y) 'From there, bounds are easy-peasy - Dim rotateBoundRect As RECTF + Dim rotateBoundRect As RectF With rotateBoundRect .Left = layerRotateNodes(0).x - rRadius .Top = layerRotateNodes(0).y - rRadius diff --git a/Modules/Drawing2D.bas b/Modules/Drawing2D.bas index 2c5b3ecacc..2e59b2f051 100644 --- a/Modules/Drawing2D.bas +++ b/Modules/Drawing2D.bas @@ -1,12 +1,12 @@ Attribute VB_Name = "Drawing2D" '*************************************************************************** 'High-Performance Backend-Agnostic 2D Rendering Interface -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 1/September/12 'Last updated: 11/May/16 'Last update: continue migrating various rendering bits out of GDI+ and into this generic renderer. ' -'In 2015-2017, I slowly migrated PhotoDemon to its own UI toolkit. The new toolkit performs a ton of 2D rendering tasks, +'In 2015-2018, I slowly migrated PhotoDemon to its own UI toolkit. The new toolkit performs a ton of 2D rendering tasks, ' so it was finally time to migrate PD's hoary old GDI+ interface to a more modern solution. ' 'This module provides a renderer-agnostic solution for various 2D drawing tasks. At present, it leans only on GDI+, diff --git a/Modules/EffectPrep.bas b/Modules/EffectPrep.bas index 8689494776..ceb10ba39f 100644 --- a/Modules/EffectPrep.bas +++ b/Modules/EffectPrep.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "EffectPrep" '*************************************************************************** 'Fast API Graphics Routines Interface -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 12/June/01 'Last updated: 25/July/17 'Last update: greatly optimize effects when an active selection is present @@ -100,7 +100,7 @@ Public Sub ResetPreviewIDs() End Sub 'This function can be used to populate a valid SAFEARRAY2D structure against any DIB -Public Sub PrepSafeArray(ByRef srcSA As SAFEARRAY2D, ByRef srcDIB As pdDIB) +Public Sub PrepSafeArray(ByRef srcSA As SafeArray2D, ByRef srcDIB As pdDIB) 'Populate a relevant SafeArray variable for the supplied DIB With srcSA @@ -118,7 +118,7 @@ End Sub 'This function can be used to populate a valid SAFEARRAY2D structure against any DIB, but instead of using bytes, each pixel ' is represented by a full LONG. ' DO NOT USE THIS ON 24-BPP DIBS, OBVIOUSLY! -Public Sub PrepSafeArray_Long(ByRef srcSA As SAFEARRAY2D, ByRef srcDIB As pdDIB) +Public Sub PrepSafeArray_Long(ByRef srcSA As SafeArray2D, ByRef srcDIB As pdDIB) 'Populate a relevant SafeArray variable for the supplied DIB With srcSA @@ -136,7 +136,7 @@ End Sub 'For some odd functions (e.g. export JPEG dialog), it's helpful to have the full power of prepImageData, but against ' a target other than the current image's main layer. This function is roughly equivalent to prepImageData, below, but ' stripped down and specifically designed for PREVIEWS ONLY. A source image must be explicitly supplied. -Public Sub PreviewNonStandardImage(ByRef tmpSA As SAFEARRAY2D, ByRef srcDIB As pdDIB, ByRef previewTarget As pdFxPreviewCtl, Optional ByVal leaveAlphaPremultiplied As Boolean = False) +Public Sub PreviewNonStandardImage(ByRef tmpSA As SafeArray2D, ByRef srcDIB As pdDIB, ByRef previewTarget As pdFxPreviewCtl, Optional ByVal leaveAlphaPremultiplied As Boolean = False) 'Before doing anything else, see if we can simply re-use our previous preview image If (m_PreviousPreviewID = previewTarget.GetUniqueID) And (m_PreviousPreviewID <> 0) And (Not workingDIB Is Nothing) And (Not m_PreviousPreviewCopy Is Nothing) Then @@ -295,7 +295,7 @@ End Sub ' 'Finally, the calling routine can optionally specify a different maximum progress bar value. By default, this is the current ' DIB's width, but some routines run vertically and the progress bar maximum needs to be changed accordingly. -Public Sub PrepImageData(ByRef tmpSA As SAFEARRAY2D, Optional isPreview As Boolean = False, Optional previewTarget As pdFxPreviewCtl, Optional newProgBarMax As Long = -1, Optional ByVal doNotTouchProgressBar As Boolean = False, Optional ByVal doNotUnPremultiplyAlpha As Boolean = False) +Public Sub PrepImageData(ByRef tmpSA As SafeArray2D, Optional isPreview As Boolean = False, Optional previewTarget As pdFxPreviewCtl, Optional newProgBarMax As Long = -1, Optional ByVal doNotTouchProgressBar As Boolean = False, Optional ByVal doNotUnPremultiplyAlpha As Boolean = False) 'Reset the public "cancel current action" tracker g_cancelCurrentAction = False @@ -304,7 +304,7 @@ Public Sub PrepImageData(ByRef tmpSA As SAFEARRAY2D, Optional isPreview As Boole ' (For example: a selected area that extends outside the boundary of the current image.) When this ' happens, we have to do some extra handling to render a correct image; basically, we must null-pad ' the current layer DIB to the size of the image, then extract the relevant bits after the fact. - Dim tmpLayer As pdLayer, selBounds As RECTF + Dim tmpLayer As pdLayer, selBounds As RectF If (pdImages(g_CurrentImage).IsSelectionActive And pdImages(g_CurrentImage).MainSelection.IsLockedIn) Then Set tmpLayer = New pdLayer selBounds = pdImages(g_CurrentImage).MainSelection.GetBoundaryRect @@ -602,7 +602,7 @@ Public Sub FinalizeImageData(Optional isPreview As Boolean = False, Optional pre If (pdImages(g_CurrentImage).IsSelectionActive And pdImages(g_CurrentImage).MainSelection.IsLockedIn) Then 'Retrieve the current selection boundaries - Dim selBounds As RECTF + Dim selBounds As RectF selBounds = pdImages(g_CurrentImage).MainSelection.GetBoundaryRect 'Before continuing further, create a copy of the selection mask at the relevant image size. @@ -667,17 +667,17 @@ Public Sub FinalizeImageData(Optional isPreview As Boolean = False, Optional pre ' between the original copy, and the new effect-processed copy.) 'Prepare a few image arrays (and array headers) in advance. - Dim pxEffect() As Byte, saEffect As SAFEARRAY1D, ptrWD As Long, strideWD As Long + Dim pxEffect() As Byte, saEffect As SafeArray1D, ptrWD As Long, strideWD As Long workingDIB.WrapArrayAroundScanline pxEffect, saEffect, 0 ptrWD = saEffect.pvData strideWD = saEffect.cElements - Dim pxSelection() As Byte, saSelection As SAFEARRAY1D, ptrSel As Long, strideSel As Long + Dim pxSelection() As Byte, saSelection As SafeArray1D, ptrSel As Long, strideSel As Long selMaskCopy.WrapArrayAroundScanline pxSelection, saSelection, 0 ptrSel = saSelection.pvData strideSel = saSelection.cElements - Dim pxDst() As Byte, saDst As SAFEARRAY1D, ptrDst As Long, strideDst As Long + Dim pxDst() As Byte, saDst As SafeArray1D, ptrDst As Long, strideDst As Long workingDIBBackup.WrapArrayAroundScanline pxDst, saDst, 0 ptrDst = saDst.pvData strideDst = saDst.cElements @@ -801,7 +801,7 @@ Public Sub FinalizeImageData(Optional isPreview As Boolean = False, Optional pre ReleaseProgressBar 'Notify the parent of the target layer of our changes - pdImages(g_CurrentImage).NotifyImageChanged UNDO_LAYER, pdImages(g_CurrentImage).GetActiveLayerIndex + pdImages(g_CurrentImage).NotifyImageChanged UNDO_Layer, pdImages(g_CurrentImage).GetActiveLayerIndex 'Pass control to the viewport renderer, which will perform the actual rendering ViewportEngine.Stage2_CompositeAllLayers pdImages(g_CurrentImage), FormMain.mainCanvas(0) diff --git a/Modules/FileMenu.bas b/Modules/FileMenu.bas index 56f5f55ced..9a48f2e6ba 100644 --- a/Modules/FileMenu.bas +++ b/Modules/FileMenu.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "FileMenu" '*************************************************************************** 'File Menu Handler -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 15/Apr/01 'Last updated: 15/August/15 'Last update: convert the old cCommonDialog references to the newer, lighter pdOpenSaveDialog instance diff --git a/Modules/Files.bas b/Modules/Files.bas index c73fc6b3f0..86496afd3f 100644 --- a/Modules/Files.bas +++ b/Modules/Files.bas @@ -1,9 +1,9 @@ Attribute VB_Name = "Files" '*************************************************************************** 'Comprehensive wrapper for pdFSO (Unicode file and folder functions) -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 6/12/01 -'Last updated: 12/July/2017 +'Last updated: 12/July/17 'Last update: large code cleanup ' 'The pdFSO class provides Unicode file/folder interactions for PhotoDemon. However, sometimes you just want to do diff --git a/Modules/FillTool.bas b/Modules/FillTool.bas index 51cb00d550..7b3827a927 100644 --- a/Modules/FillTool.bas +++ b/Modules/FillTool.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "FillTool" '*************************************************************************** 'PhotoDemon Bucket Fill Manager -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 30/August/17 'Last updated: 04/September/17 'Last update: continued work on initial build diff --git a/Modules/Filters_Area.bas b/Modules/Filters_Area.bas index 3ba44ff86e..cd1c2eca2d 100644 --- a/Modules/Filters_Area.bas +++ b/Modules/Filters_Area.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Filters_Area" '*************************************************************************** 'Filter (Area) Interface -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 12/June/01 'Last updated: 31/July/17 'Last update: migrate the convolution filter functions to XML param strings diff --git a/Modules/Filters_ByteArray.bas b/Modules/Filters_ByteArray.bas index 36b9af51ee..75bbdf79f5 100644 --- a/Modules/Filters_ByteArray.bas +++ b/Modules/Filters_ByteArray.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Filters_ByteArray" '*************************************************************************** 'Byte Array Filters Module -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 02/April/15 'Last updated: 02/April/15 'Last update: start assembling byte-array-specific filter collection diff --git a/Modules/Filters_Color.bas b/Modules/Filters_Color.bas index 45ec537fd2..22e97625cb 100644 --- a/Modules/Filters_Color.bas +++ b/Modules/Filters_Color.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Filters_Adjustments" '*************************************************************************** 'Filter (Color Effects) Interface -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 25/January/03 'Last updated: 06/September/12 'Last update: new formulas for all AutoEnhance functions. Now they are much faster AND they offer much better results. diff --git a/Modules/Filters_Layers.bas b/Modules/Filters_Layers.bas index 8ebe6865b0..96bf6aa14c 100644 --- a/Modules/Filters_Layers.bas +++ b/Modules/Filters_Layers.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Filters_Layers" '*************************************************************************** 'DIB Filters Module -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 15/February/13 'Last updated: 09/August/17 'Last update: new functions for blurring just a sub-region of an image diff --git a/Modules/Filters_Misc.bas b/Modules/Filters_Misc.bas index 41cb1c5c00..b03edfb690 100644 --- a/Modules/Filters_Misc.bas +++ b/Modules/Filters_Misc.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Filters_Miscellaneous" '*************************************************************************** 'Filter Module -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 13/October/00 'Last updated: 07/September/15 'Last update: continued work on moving crap out of this module diff --git a/Modules/Filters_Natural.bas b/Modules/Filters_Natural.bas index 0be37335d5..876d11043a 100644 --- a/Modules/Filters_Natural.bas +++ b/Modules/Filters_Natural.bas @@ -1,9 +1,9 @@ Attribute VB_Name = "Filters_Natural" '*************************************************************************** '"Natural" Filters -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: 8/April/02 -'Last updated: 17/October/2017 +'Last updated: 17/October/17 'Last update: migrate "metal" effect here, as it's useful in a number of other settings ' 'Runs all nature-type filters. Includes water, steel, burn, rainbow, etc. diff --git a/Modules/Filters_Render.bas b/Modules/Filters_Render.bas index b6a87c9e0c..a8a52aeb66 100644 --- a/Modules/Filters_Render.bas +++ b/Modules/Filters_Render.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Filters_Render" '*************************************************************************** 'Render Filter Collection -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 14/October/17 'Last updated: 14/October/17 'Last update: start migrating render-specific functions here diff --git a/Modules/Filters_Stylize.bas b/Modules/Filters_Stylize.bas index a35b2e76c8..16667c051b 100644 --- a/Modules/Filters_Stylize.bas +++ b/Modules/Filters_Stylize.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Filters_Stylize" '*************************************************************************** 'Stylize Filter Collection -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: 8/April/02 'Last updated: 19/October/17 'Last update: add upgraded "Antique" filter effect diff --git a/Modules/Filters_Transform.bas b/Modules/Filters_Transform.bas index afd60aecde..9f4b0b4702 100644 --- a/Modules/Filters_Transform.bas +++ b/Modules/Filters_Transform.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Filters_Transform" '*************************************************************************** 'Image Transformations Interface (including flip/mirror/rotation/crop/etc) -'Copyright 2003-2017 by Tanner Helland +'Copyright 2003-2018 by Tanner Helland 'Created: 25/January/03 'Last updated: 13/June/17 'Last update: routine code-cleanup, minor optimizations diff --git a/Modules/Fonts.bas b/Modules/Fonts.bas index 588dcb8c28..ed89c4d334 100644 --- a/Modules/Fonts.bas +++ b/Modules/Fonts.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Fonts" '*************************************************************************** 'PhotoDemon Font Manager -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 31/May/13 'Last updated: 26/April/15 'Last update: start splitting relevant bits from pdFont into this separate manager module. pdFont still exists for diff --git a/Modules/GDI.bas b/Modules/GDI.bas index 54c7419002..d6e86e512c 100644 --- a/Modules/GDI.bas +++ b/Modules/GDI.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "GDI" '*************************************************************************** 'GDI interop manager -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 03/April/2001 'Last updated: 28/June/16 'Last update: continued clean-up of PD-specific code diff --git a/Modules/GDIPlus.bas b/Modules/GDIPlus.bas index 898ca6ffd8..f1383b911c 100644 --- a/Modules/GDIPlus.bas +++ b/Modules/GDIPlus.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "GDI_Plus" '*************************************************************************** 'GDI+ Interface -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 1/September/12 'Last updated: 25/July/17 'Last update: fix alpha premultiplication tracking after certain resize operations @@ -840,7 +840,7 @@ End Type Private Type BITMAPINFO Header As BITMAPINFOHEADER - Colors(0 To 255) As RGBQUAD + Colors(0 To 255) As RGBQuad End Type 'This (stupid) type is used so we can take advantage of LSet when performing some conversions @@ -899,8 +899,8 @@ End Type Private Type GDIP_EnhMetaHeader3 itype As Long nSize As Long - rclBounds As RECTL - rclFrame As RECTL + rclBounds As RectL + rclFrame As RectL dSignature As Long nVersion As Long nBytes As Long @@ -1000,7 +1000,7 @@ Private Declare Function GdipAddPathPolygonI Lib "gdiplus" (ByVal hPath As Long, Private Declare Function GdipAddPathArc Lib "gdiplus" (ByVal hPath As Long, ByVal x As Single, ByVal y As Single, ByVal arcWidth As Single, ByVal arcHeight As Single, ByVal startAngle As Single, ByVal sweepAngle As Single) As GP_Result Private Declare Function GdipAddPathPath Lib "gdiplus" (ByVal hPath As Long, ByVal pathToAdd As Long, ByVal connectToPreviousPoint As Long) As GP_Result -Private Declare Function GdipBitmapLockBits Lib "gdiplus" (ByVal hImage As Long, ByRef srcRect As RECTL, ByVal lockMode As GP_BitmapLockMode, ByVal dstPixelFormat As GP_PixelFormat, ByRef srcBitmapData As GP_BitmapData) As GP_Result +Private Declare Function GdipBitmapLockBits Lib "gdiplus" (ByVal hImage As Long, ByRef srcRect As RectL, ByVal lockMode As GP_BitmapLockMode, ByVal dstPixelFormat As GP_PixelFormat, ByRef srcBitmapData As GP_BitmapData) As GP_Result Private Declare Function GdipBitmapUnlockBits Lib "gdiplus" (ByVal hImage As Long, ByRef srcBitmapData As GP_BitmapData) As GP_Result Private Declare Function GdipCloneBitmapAreaI Lib "gdiplus" (ByVal srcX As Long, ByVal srcY As Long, ByVal srcWidth As Long, ByVal srcHeight As Long, ByVal newPixelFormat As GP_PixelFormat, ByVal hSrcBitmap As Long, ByRef hDstBitmap As Long) As GP_Result @@ -1009,8 +1009,8 @@ Private Declare Function GdipClonePath Lib "gdiplus" (ByVal srcPath As Long, ByR Private Declare Function GdipCloneRegion Lib "gdiplus" (ByVal srcRegion As Long, ByRef dstRegion As Long) As GP_Result Private Declare Function GdipClosePathFigure Lib "gdiplus" (ByVal hPath As Long) As GP_Result -Private Declare Function GdipCombineRegionRect Lib "gdiplus" (ByVal hRegion As Long, ByRef srcRectF As RECTF, ByVal dstCombineMode As GP_CombineMode) As GP_Result -Private Declare Function GdipCombineRegionRectI Lib "gdiplus" (ByVal hRegion As Long, ByRef srcRectL As RECTL, ByVal dstCombineMode As GP_CombineMode) As GP_Result +Private Declare Function GdipCombineRegionRect Lib "gdiplus" (ByVal hRegion As Long, ByRef srcRectF As RectF, ByVal dstCombineMode As GP_CombineMode) As GP_Result +Private Declare Function GdipCombineRegionRectI Lib "gdiplus" (ByVal hRegion As Long, ByRef srcRectL As RectL, ByVal dstCombineMode As GP_CombineMode) As GP_Result Private Declare Function GdipCombineRegionRegion Lib "gdiplus" (ByVal dstRegion As Long, ByVal srcRegion As Long, ByVal dstCombineMode As GP_CombineMode) As GP_Result Private Declare Function GdipCombineRegionPath Lib "gdiplus" (ByVal dstRegion As Long, ByVal srcPath As Long, ByVal dstCombineMode As GP_CombineMode) As GP_Result @@ -1023,8 +1023,8 @@ Private Declare Function GdipCreateCachedBitmap Lib "gdiplus" (ByVal hBitmap As Private Declare Function GdipCreateFromHDC Lib "gdiplus" (ByVal hDC As Long, ByRef dstGraphics As Long) As GP_Result Private Declare Function GdipCreateHatchBrush Lib "gdiplus" (ByVal bHatchStyle As GP_PatternStyle, ByVal bForeColor As Long, ByVal bBackColor As Long, ByRef dstBrush As Long) As GP_Result Private Declare Function GdipCreateImageAttributes Lib "gdiplus" (ByRef dstImageAttributes As Long) As GP_Result -Private Declare Function GdipCreateLineBrush Lib "gdiplus" (ByRef firstPoint As POINTFLOAT, ByRef secondPoint As POINTFLOAT, ByVal firstRGBA As Long, ByVal secondRGBA As Long, ByVal brushWrapMode As GP_WrapMode, ByRef dstBrush As Long) As GP_Result -Private Declare Function GdipCreateLineBrushFromRectWithAngle Lib "gdiplus" (ByRef srcRect As RECTF, ByVal firstRGBA As Long, ByVal secondRGBA As Long, ByVal gradAngle As Single, ByVal isAngleScalable As Long, ByVal gradientWrapMode As GP_WrapMode, ByRef dstLineGradientBrush As Long) As GP_Result +Private Declare Function GdipCreateLineBrush Lib "gdiplus" (ByRef firstPoint As PointFloat, ByRef secondPoint As PointFloat, ByVal firstRGBA As Long, ByVal secondRGBA As Long, ByVal brushWrapMode As GP_WrapMode, ByRef dstBrush As Long) As GP_Result +Private Declare Function GdipCreateLineBrushFromRectWithAngle Lib "gdiplus" (ByRef srcRect As RectF, ByVal firstRGBA As Long, ByVal secondRGBA As Long, ByVal gradAngle As Single, ByVal isAngleScalable As Long, ByVal gradientWrapMode As GP_WrapMode, ByRef dstLineGradientBrush As Long) As GP_Result Private Declare Function GdipCreateMatrix Lib "gdiplus" (ByRef dstMatrix As Long) As GP_Result Private Declare Function GdipCreatePath Lib "gdiplus" (ByVal pathFillMode As GP_FillMode, ByRef dstPath As Long) As GP_Result Private Declare Function GdipCreatePathGradientFromPath Lib "gdiplus" (ByVal ptrToSrcPath As Long, ByRef dstPathGradientBrush As Long) As GP_Result @@ -1032,7 +1032,7 @@ Private Declare Function GdipCreatePen1 Lib "gdiplus" (ByVal srcColor As Long, B Private Declare Function GdipCreatePenFromBrush Lib "gdiplus" Alias "GdipCreatePen2" (ByVal srcBrush As Long, ByVal penWidth As Single, ByVal srcUnit As GP_Unit, ByRef dstPen As Long) As GP_Result Private Declare Function GdipCreateRegion Lib "gdiplus" (ByRef dstRegion As Long) As GP_Result Private Declare Function GdipCreateRegionPath Lib "gdiplus" (ByVal hPath As Long, ByRef hRegion As Long) As GP_Result -Private Declare Function GdipCreateRegionRect Lib "gdiplus" (ByRef srcRect As RECTF, ByRef hRegion As Long) As GP_Result +Private Declare Function GdipCreateRegionRect Lib "gdiplus" (ByRef srcRect As RectF, ByRef hRegion As Long) As GP_Result Private Declare Function GdipCreateRegionRgnData Lib "gdiplus" (ByVal ptrToRegionData As Long, ByVal sizeOfRegionData As Long, ByRef dstRegion As Long) As GP_Result Private Declare Function GdipCreateSolidFill Lib "gdiplus" (ByVal srcColor As Long, ByRef dstBrush As Long) As GP_Result Private Declare Function GdipCreateTexture Lib "gdiplus" (ByVal hImage As Long, ByVal textureWrapMode As GP_WrapMode, ByRef dstTexture As Long) As GP_Result @@ -1088,7 +1088,7 @@ Private Declare Function GdipFillRectangleI Lib "gdiplus" (ByVal hGraphics As Lo Private Declare Function GdipGetClip Lib "gdiplus" (ByVal hGraphics As Long, ByRef dstRegion As Long) As GP_Result Private Declare Function GdipGetCompositingMode Lib "gdiplus" (ByVal hGraphics As Long, ByVal dstCompositingMode As GP_CompositingMode) As GP_Result Private Declare Function GdipGetCompositingQuality Lib "gdiplus" (ByVal hGraphics As Long, ByRef dstCompositingQuality As GP_CompositingQuality) As GP_Result -Private Declare Function GdipGetImageBounds Lib "gdiplus" (ByVal hImage As Long, ByRef dstRectF As RECTF, ByRef dstUnit As GP_Unit) As GP_Result +Private Declare Function GdipGetImageBounds Lib "gdiplus" (ByVal hImage As Long, ByRef dstRectF As RectF, ByRef dstUnit As GP_Unit) As GP_Result Private Declare Function GdipGetImageDimension Lib "gdiplus" (ByVal hImage As Long, ByRef dstWidth As Single, ByRef dstHeight As Single) As GP_Result Private Declare Function GdipGetImageEncoders Lib "gdiplus" (ByVal numOfEncoders As Long, ByVal sizeOfEncoders As Long, ByVal ptrToDstEncoders As Long) As GP_Result Private Declare Function GdipGetImageEncodersSize Lib "gdiplus" (ByRef numOfEncoders As Long, ByRef sizeOfEncoders As Long) As GP_Result @@ -1101,8 +1101,8 @@ Private Declare Function GdipGetImageWidth Lib "gdiplus" (ByVal hImage As Long, Private Declare Function GdipGetInterpolationMode Lib "gdiplus" (ByVal hGraphics As Long, ByRef dstInterpolationMode As GP_InterpolationMode) As GP_Result Private Declare Function GdipGetMetafileHeaderFromMetafile Lib "gdiplus" (ByVal hMetafile As Long, ByRef dstHeader As GP_MetafileHeader) As GP_Result Private Declare Function GdipGetPathFillMode Lib "gdiplus" (ByVal hPath As Long, ByRef dstFillRule As GP_FillMode) As GP_Result -Private Declare Function GdipGetPathWorldBounds Lib "gdiplus" (ByVal hPath As Long, ByRef dstBounds As RECTF, ByVal tmpTransformMatrix As Long, ByVal tmpPenHandle As Long) As GP_Result -Private Declare Function GdipGetPathWorldBoundsI Lib "gdiplus" (ByVal hPath As Long, ByRef dstBounds As RECTL, ByVal tmpTransformMatrix As Long, ByVal tmpPenHandle As Long) As GP_Result +Private Declare Function GdipGetPathWorldBounds Lib "gdiplus" (ByVal hPath As Long, ByRef dstBounds As RectF, ByVal tmpTransformMatrix As Long, ByVal tmpPenHandle As Long) As GP_Result +Private Declare Function GdipGetPathWorldBoundsI Lib "gdiplus" (ByVal hPath As Long, ByRef dstBounds As RectL, ByVal tmpTransformMatrix As Long, ByVal tmpPenHandle As Long) As GP_Result Private Declare Function GdipGetPenColor Lib "gdiplus" (ByVal hPen As Long, ByRef dstPARGBColor As Long) As GP_Result Private Declare Function GdipGetPenDashCap Lib "gdiplus" Alias "GdipGetPenDashCap197819" (ByVal hPen As Long, ByRef dstCap As GP_DashCap) As GP_Result Private Declare Function GdipGetPenDashOffset Lib "gdiplus" (ByVal hPen As Long, ByRef dstOffset As Single) As GP_Result @@ -1116,8 +1116,8 @@ Private Declare Function GdipGetPenWidth Lib "gdiplus" (ByVal hPen As Long, ByRe Private Declare Function GdipGetPixelOffsetMode Lib "gdiplus" (ByVal hGraphics As Long, ByRef dstMode As GP_PixelOffsetMode) As GP_Result Private Declare Function GdipGetPropertyItem Lib "gdiplus" (ByVal hImage As Long, ByVal gpPropertyID As Long, ByVal srcPropertySize As Long, ByVal ptrToDstBuffer As Long) As GP_Result Private Declare Function GdipGetPropertyItemSize Lib "gdiplus" (ByVal hImage As Long, ByVal gpPropertyID As GP_PropertyTag, ByRef dstPropertySize As Long) As GP_Result -Private Declare Function GdipGetRegionBounds Lib "gdiplus" (ByVal hRegion As Long, ByVal hGraphics As Long, ByRef dstRectF As RECTF) As GP_Result -Private Declare Function GdipGetRegionBoundsI Lib "gdiplus" (ByVal hRegion As Long, ByVal hGraphics As Long, ByRef dstRectL As RECTL) As GP_Result +Private Declare Function GdipGetRegionBounds Lib "gdiplus" (ByVal hRegion As Long, ByVal hGraphics As Long, ByRef dstRectF As RectF) As GP_Result +Private Declare Function GdipGetRegionBoundsI Lib "gdiplus" (ByVal hRegion As Long, ByVal hGraphics As Long, ByRef dstRectL As RectL) As GP_Result Private Declare Function GdipGetRegionHRgn Lib "gdiplus" (ByVal hRegion As Long, ByVal hGraphics As Long, ByRef dstHRgn As Long) As GP_Result Private Declare Function GdipGetRenderingOrigin Lib "gdiplus" (ByVal hGraphics As Long, ByRef dstX As Long, ByRef dstY As Long) As GP_Result Private Declare Function GdipGetSmoothingMode Lib "gdiplus" (ByVal hGraphics As Long, ByRef dstMode As GP_SmoothingMode) As GP_Result @@ -1161,7 +1161,7 @@ Private Declare Function GdipSetImageAttributesColorMatrix Lib "gdiplus" (ByVal Private Declare Function GdipSetInfinite Lib "gdiplus" (ByVal hRegion As Long) As GP_Result Private Declare Function GdipSetInterpolationMode Lib "gdiplus" (ByVal hGraphics As Long, ByVal newInterpolationMode As GP_InterpolationMode) As GP_Result Private Declare Function GdipSetLinePresetBlend Lib "gdiplus" (ByVal hBrush As Long, ByVal ptrToFirstColor As Long, ByVal ptrToFirstPosition As Long, ByVal numOfPoints As Long) As GP_Result -Private Declare Function GdipSetPathGradientCenterPoint Lib "gdiplus" (ByVal hBrush As Long, ByRef newCenterPoints As POINTFLOAT) As GP_Result +Private Declare Function GdipSetPathGradientCenterPoint Lib "gdiplus" (ByVal hBrush As Long, ByRef newCenterPoints As PointFloat) As GP_Result Private Declare Function GdipSetPathGradientPresetBlend Lib "gdiplus" (ByVal hBrush As Long, ByVal ptrToFirstColor As Long, ByVal ptrToFirstPosition As Long, ByVal numOfPoints As Long) As GP_Result Private Declare Function GdipSetPathGradientWrapMode Lib "gdiplus" (ByVal hBrush As Long, ByVal newWrapMode As GP_WrapMode) As GP_Result Private Declare Function GdipSetPathFillMode Lib "gdiplus" (ByVal hPath As Long, ByVal pathFillMode As GP_FillMode) As GP_Result @@ -1255,7 +1255,7 @@ Private Declare Function CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Dest A Private Declare Function GdipCreateEffect Lib "gdiplus" (ByVal dwCid1 As Long, ByVal dwCid2 As Long, ByVal dwCid3 As Long, ByVal dwCid4 As Long, ByRef mEffect As Long) As Long Private Declare Function GdipSetEffectParameters Lib "gdiplus" (ByVal mEffect As Long, ByRef eParams As Any, ByVal Size As Long) As Long Private Declare Function GdipDeleteEffect Lib "gdiplus" (ByVal mEffect As Long) As Long -Private Declare Function GdipDrawImageFX Lib "gdiplus" (ByVal mGraphics As Long, ByVal mImage As Long, ByRef iSource As RECTF, ByVal xForm As Long, ByVal mEffect As Long, ByVal mImageAttributes As Long, ByVal srcUnit As Long) As Long +Private Declare Function GdipDrawImageFX Lib "gdiplus" (ByVal mGraphics As Long, ByVal mImage As Long, ByRef iSource As RectF, ByVal xForm As Long, ByVal mEffect As Long, ByVal mImageAttributes As Long, ByVal srcUnit As Long) As Long Private Declare Function GdipCreateMatrix2 Lib "gdiplus" (ByVal mM11 As Single, ByVal mM12 As Single, ByVal mM21 As Single, ByVal mM22 As Single, ByVal mDx As Single, ByVal mDy As Single, ByRef mMatrix As Long) As Long Private Type BlurParams @@ -1406,7 +1406,7 @@ Public Function GDIPlusBlurDIB(ByRef dstDIB As pdDIB, ByVal blurRadius As Long, If GdipSetEffectParameters(hEffect, tmpParams, Len(tmpParams)) = 0 Then 'The DrawImageFX call requires a target rect. Create one now (in GDI+ format, e.g. RECTF) - Dim tmpRect As RECTF + Dim tmpRect As RectF tmpRect.Left = rLeft tmpRect.Top = rTop tmpRect.Width = rWidth @@ -1461,7 +1461,7 @@ Public Function GDIPlusDrawCanvasCircle(ByVal dstDC As Long, ByVal cx As Single, End Function 'Similar function to GdiPlusDrawCanvasCircle, above, but draws a RectF outline, specifically -Public Function GDIPlusDrawCanvasRectF(ByVal dstDC As Long, ByRef srcRect As RECTF, Optional ByVal cTransparency As Long = 190, Optional ByVal useHighlightColor As Boolean = False) As Boolean +Public Function GDIPlusDrawCanvasRectF(ByVal dstDC As Long, ByRef srcRect As RectF, Optional ByVal cTransparency As Long = 190, Optional ByVal useHighlightColor As Boolean = False) As Boolean GDI_Plus.GDIPlusDrawRectFOutlineToDC dstDC, srcRect, g_Themer.GetGenericUIColor(UI_LineEdge, , , useHighlightColor), cTransparency, 3#, True, GP_LJ_Miter GDI_Plus.GDIPlusDrawRectFOutlineToDC dstDC, srcRect, g_Themer.GetGenericUIColor(UI_LineCenter, , , useHighlightColor), 220, 1.6, True, GP_LJ_Miter End Function @@ -1526,11 +1526,11 @@ Public Function GDIPlusDrawRectOutlineToDC(ByVal dstDC As Long, ByVal rectLeft A End Function -Public Function GDIPlusDrawRectLOutlineToDC(ByVal dstDC As Long, ByRef srcRectL As RECTL, ByVal eColor As Long, Optional ByVal cTransparency As Long = 255, Optional ByVal lineWidth As Single = 1, Optional ByVal useAA As Boolean = True, Optional ByVal customLinejoin As GP_LineJoin = GP_LJ_Bevel, Optional ByVal hqOffsets As Boolean = False, Optional ByVal useInsetMode As Boolean = False) As Boolean +Public Function GDIPlusDrawRectLOutlineToDC(ByVal dstDC As Long, ByRef srcRectL As RectL, ByVal eColor As Long, Optional ByVal cTransparency As Long = 255, Optional ByVal lineWidth As Single = 1, Optional ByVal useAA As Boolean = True, Optional ByVal customLinejoin As GP_LineJoin = GP_LJ_Bevel, Optional ByVal hqOffsets As Boolean = False, Optional ByVal useInsetMode As Boolean = False) As Boolean GDIPlusDrawRectLOutlineToDC = GDIPlusDrawRectOutlineToDC(dstDC, srcRectL.Left, srcRectL.Top, srcRectL.Right, srcRectL.Bottom, eColor, cTransparency, lineWidth, useAA, customLinejoin, hqOffsets, useInsetMode) End Function -Public Function GDIPlusDrawRectFOutlineToDC(ByVal dstDC As Long, ByRef srcRectF As RECTF, ByVal eColor As Long, Optional ByVal cTransparency As Long = 255, Optional ByVal lineWidth As Single = 1, Optional ByVal useAA As Boolean = True, Optional ByVal customLinejoin As GP_LineJoin = GP_LJ_Bevel, Optional ByVal hqOffsets As Boolean = False, Optional ByVal useInsetMode As Boolean = False) As Boolean +Public Function GDIPlusDrawRectFOutlineToDC(ByVal dstDC As Long, ByRef srcRectF As RectF, ByVal eColor As Long, Optional ByVal cTransparency As Long = 255, Optional ByVal lineWidth As Single = 1, Optional ByVal useAA As Boolean = True, Optional ByVal customLinejoin As GP_LineJoin = GP_LJ_Bevel, Optional ByVal hqOffsets As Boolean = False, Optional ByVal useInsetMode As Boolean = False) As Boolean GDIPlusDrawRectFOutlineToDC = GDIPlusDrawRectOutlineToDC(dstDC, srcRectF.Left, srcRectF.Top, srcRectF.Left + srcRectF.Width, srcRectF.Top + srcRectF.Height, eColor, cTransparency, lineWidth, useAA, customLinejoin, hqOffsets, useInsetMode) End Function @@ -1605,7 +1605,7 @@ End Function 'Use GDI+ to fill a DC with a color and optional alpha value; while not as efficient as using GDI, this allows us to set the full ' DIB alpha in a single pass, which is important for 32-bpp DIBs. -Public Function GDIPlusFillRectLToDC(ByVal dstDC As Long, ByRef srcRect As RECTL, ByVal eColor As Long, Optional ByVal eTransparency As Long = 255, Optional ByVal dstFillMode As GP_CompositingMode = GP_CM_SourceOver, Optional ByVal useAA As Boolean = False) As Boolean +Public Function GDIPlusFillRectLToDC(ByVal dstDC As Long, ByRef srcRect As RectL, ByVal eColor As Long, Optional ByVal eTransparency As Long = 255, Optional ByVal dstFillMode As GP_CompositingMode = GP_CM_SourceOver, Optional ByVal useAA As Boolean = False) As Boolean 'Create a GDI+ copy of the image and request AA Dim hGraphics As Long @@ -1631,7 +1631,7 @@ End Function 'Use GDI+ to fill a DC with a color and optional alpha value; while not as efficient as using GDI, this allows us to set the full ' DIB alpha in a single pass, which is important for 32-bpp DIBs. -Public Function GDIPlusFillRectFToDC(ByVal dstDC As Long, ByRef srcRect As RECTF, ByVal eColor As Long, Optional ByVal eTransparency As Long = 255, Optional ByVal dstFillMode As GP_CompositingMode = GP_CM_SourceOver, Optional ByVal useAA As Boolean = False) As Boolean +Public Function GDIPlusFillRectFToDC(ByVal dstDC As Long, ByRef srcRect As RectF, ByVal eColor As Long, Optional ByVal eTransparency As Long = 255, Optional ByVal dstFillMode As GP_CompositingMode = GP_CM_SourceOver, Optional ByVal useAA As Boolean = False) As Boolean 'Create a GDI+ copy of the image and request AA Dim hGraphics As Long @@ -1751,11 +1751,11 @@ Public Function GDIPlusFillDIBRect(ByRef dstDIB As pdDIB, ByVal x1 As Single, By End Function -Public Function GDIPlusFillDIBRectL(ByRef dstDIB As pdDIB, ByRef srcRectL As RECTL, ByVal eColor As Long, Optional ByVal eTransparency As Long = 255, Optional ByVal dstFillMode As GP_CompositingMode = GP_CM_SourceOver, Optional ByVal useAA As Boolean = False) As Boolean +Public Function GDIPlusFillDIBRectL(ByRef dstDIB As pdDIB, ByRef srcRectL As RectL, ByVal eColor As Long, Optional ByVal eTransparency As Long = 255, Optional ByVal dstFillMode As GP_CompositingMode = GP_CM_SourceOver, Optional ByVal useAA As Boolean = False) As Boolean GDIPlusFillDIBRectL = GDIPlusFillDIBRect(dstDIB, srcRectL.Left, srcRectL.Top, srcRectL.Right - srcRectL.Left, srcRectL.Bottom - srcRectL.Top, eColor, eTransparency, dstFillMode, useAA) End Function -Public Function GDIPlusFillDIBRectF(ByRef dstDIB As pdDIB, ByRef srcRectF As RECTF, ByVal eColor As Long, Optional ByVal eTransparency As Long = 255, Optional ByVal dstFillMode As GP_CompositingMode = GP_CM_SourceOver, Optional ByVal useAA As Boolean = False) As Boolean +Public Function GDIPlusFillDIBRectF(ByRef dstDIB As pdDIB, ByRef srcRectF As RectF, ByVal eColor As Long, Optional ByVal eTransparency As Long = 255, Optional ByVal dstFillMode As GP_CompositingMode = GP_CM_SourceOver, Optional ByVal useAA As Boolean = False) As Boolean GDIPlusFillDIBRectF = GDIPlusFillDIBRect(dstDIB, srcRectF.Left, srcRectF.Top, srcRectF.Width, srcRectF.Height, eColor, eTransparency, dstFillMode, useAA) End Function @@ -2171,7 +2171,7 @@ Public Function GDIPlusLoadPicture(ByVal srcFilename As String, ByRef dstDIB As isCMYK = ((iPixelFormat And GP_PF_32bppCMYK) <> 0) Dim copyBitmapData As GP_BitmapData - Dim tmpRect As RECTL + Dim tmpRect As RectL Dim hGraphics As Long 'We now want to split handling for metafiles vs bitmaps. Metafiles can be directly "painted" onto the target surface, which allows us @@ -2663,7 +2663,7 @@ End Function 'I'm not sure whether a pure GDI+ solution or a manual solution is faster, but because the manual solution guarantees the ' smallest possible rect (unlike GDI+), I'm going with it for now. -Public Function IntersectRectF(ByRef dstRect As RECTF, ByRef srcRect1 As RECTF, ByRef srcRect2 As RECTF) As Boolean +Public Function IntersectRectF(ByRef dstRect As RectF, ByRef srcRect1 As RectF, ByRef srcRect2 As RectF) As Boolean With dstRect @@ -2686,7 +2686,7 @@ End Function 'Given an arbitrary array of points, use GDI+ to find a bounding rect for the region created from the closed shape formed by the points. ' This function is self-managing, meaning it will delete any GDI+ objects it generates. -Public Function GetGDIPlusBoundingRectFromPoints(ByVal numOfPoints As Long, ByVal ptrFloatArray As Long, Optional ByVal useFillMode As GP_FillMode = GP_FM_Alternate, Optional ByVal useCurveMode As Boolean = False, Optional ByVal curveTension As Single, Optional ByVal penWidth As Single = 1#, Optional ByVal customLineCap As GP_LineCap = GP_LC_Flat) As RECTF +Public Function GetGDIPlusBoundingRectFromPoints(ByVal numOfPoints As Long, ByVal ptrFloatArray As Long, Optional ByVal useFillMode As GP_FillMode = GP_FM_Alternate, Optional ByVal useCurveMode As Boolean = False, Optional ByVal curveTension As Single, Optional ByVal penWidth As Single = 1#, Optional ByVal customLineCap As GP_LineCap = GP_LC_Flat) As RectF 'Start by creating a blank GDI+ path object. Dim gdipPathHandle As Long @@ -2718,7 +2718,7 @@ End Function 'Given an arbitrary array of points, and a pdImage handle, use GDI+ to find the union a rect of the path and the image. This is relevant for shapes, ' which may be placed off the image, and we are only interested in the part the shape that actually overlaps the image itself. -Public Function GetGDIPlusUnionFromPointsAndImage(ByVal numOfPoints As Long, ByVal ptrFloatArray As Long, ByRef srcImage As pdImage, Optional ByVal useFillMode As GP_FillMode = GP_FM_Alternate, Optional ByVal useCurveMode As Boolean = False, Optional ByVal curveTension As Single) As RECTF +Public Function GetGDIPlusUnionFromPointsAndImage(ByVal numOfPoints As Long, ByVal ptrFloatArray As Long, ByRef srcImage As pdImage, Optional ByVal useFillMode As GP_FillMode = GP_FM_Alternate, Optional ByVal useCurveMode As Boolean = False, Optional ByVal curveTension As Single) As RectF 'Start by creating a blank GDI+ path object. Dim gdipRegionHandle As Long, gdipPathHandle As Long @@ -2735,7 +2735,7 @@ Public Function GetGDIPlusUnionFromPointsAndImage(ByVal numOfPoints As Long, ByV GdipCreateRegionPath gdipPathHandle, gdipRegionHandle 'Next, create a rect that represents the bounds of the image - Dim imgRect As RECTF + Dim imgRect As RectF With imgRect .Left = 0 .Top = 0 @@ -2873,7 +2873,7 @@ End Sub ' 'Note that the supplied plgPoints array *MUST HAVE THREE POINTS* in it, in the specific order: top-left, top-right, bottom-left. ' The fourth point is inferred from the other three. -Public Sub GDIPlus_PlgBlt(ByRef dstDIB As pdDIB, ByRef plgPoints() As POINTFLOAT, ByRef srcDIB As pdDIB, ByVal x2 As Single, ByVal y2 As Single, ByVal srcWidth As Single, ByVal srcHeight As Single, Optional ByVal newAlpha As Single = 1#, Optional ByVal interpolationType As GP_InterpolationMode = GP_IM_HighQualityBicubic, Optional ByVal useHQOffsets As Boolean = True) +Public Sub GDIPlus_PlgBlt(ByRef dstDIB As pdDIB, ByRef plgPoints() As PointFloat, ByRef srcDIB As pdDIB, ByVal x2 As Single, ByVal y2 As Single, ByVal srcWidth As Single, ByVal srcHeight As Single, Optional ByVal newAlpha As Single = 1#, Optional ByVal interpolationType As GP_InterpolationMode = GP_IM_HighQualityBicubic, Optional ByVal useHQOffsets As Boolean = True) 'Because this function is such a crucial part of PD's render chain, I occasionally like to profile it against ' viewport engine changes. Uncomment the two lines below, and the reporting line at the end of the sub to @@ -2960,8 +2960,8 @@ Public Sub GDIPlus_RotateDIBPlgStyle(ByRef srcDIB As pdDIB, ByRef dstDIB As pdDI 'We also want a copy of the corner points of the rotated rect; we'll use these to perform a fast PlgBlt-like operation, ' which is how we draw both the rotation and the corner extensions. - Dim listOfPoints() As POINTFLOAT - ReDim listOfPoints(0 To 3) As POINTFLOAT + Dim listOfPoints() As PointFloat + ReDim listOfPoints(0 To 3) As PointFloat PDMath.FindCornersOfRotatedRect srcDIB.GetDIBWidth, srcDIB.GetDIBHeight, rotateAngle, listOfPoints, True 'Calculate the size difference between the source and destination images. We need to add this offset to all @@ -2981,8 +2981,8 @@ Public Sub GDIPlus_RotateDIBPlgStyle(ByRef srcDIB As pdDIB, ByRef dstDIB As pdDI 'If a background color is being applied, "cut out" the target region now If (Not transparentBackground) Then - Dim tmpPoints() As POINTFLOAT - ReDim tmpPoints(0 To 3) As POINTFLOAT + Dim tmpPoints() As PointFloat + ReDim tmpPoints(0 To 3) As PointFloat tmpPoints(0) = listOfPoints(0) tmpPoints(1) = listOfPoints(1) tmpPoints(2) = listOfPoints(3) @@ -3049,8 +3049,8 @@ Public Sub GDIPlus_GetRotatedClampedDIB(ByRef srcDIB As pdDIB, ByRef dstDIB As p 'We also want a copy of the corner points of the rotated rect; we'll use these to perform a fast PlgBlt-like operation, ' which is how we draw both the rotation and the corner extensions. - Dim listOfPoints() As POINTFLOAT - ReDim listOfPoints(0 To 3) As POINTFLOAT + Dim listOfPoints() As PointFloat + ReDim listOfPoints(0 To 3) As PointFloat PDMath.FindCornersOfRotatedRect srcDIB.GetDIBWidth, srcDIB.GetDIBHeight, rotateAngle, listOfPoints, True 'Calculate the size difference between the source and destination images. We need to add this offset to all @@ -3075,8 +3075,8 @@ Public Sub GDIPlus_GetRotatedClampedDIB(ByRef srcDIB As pdDIB, ByRef dstDIB As p ' stretched version of the image edge, resulting in "clamped" edge behavior. Dim diagDistance As Double, distDiff As Double Dim dx As Double, dy As Double, lineLength As Double, pX As Double, pY As Double - Dim padPoints() As POINTFLOAT - ReDim padPoints(0 To 2) As POINTFLOAT + Dim padPoints() As PointFloat + ReDim padPoints(0 To 2) As PointFloat 'Calculate the distance from the center of the rotated image to the corner of the rotated image diagDistance = Sqr(nWidth * nWidth + nHeight * nHeight) / 2 @@ -3386,7 +3386,7 @@ Public Function FillQuadWithVBRGB(ByVal vbRGB As Long, ByVal alphaValue As Byte) 'The vbRGB constant may be an OLE color constant; if that happens, we want to convert it to a normal RGB quad. vbRGB = TranslateColor(vbRGB) - Dim dstQuad As RGBQUAD + Dim dstQuad As RGBQuad dstQuad.Red = Drawing2D.ExtractRed(vbRGB) dstQuad.Green = Drawing2D.ExtractGreen(vbRGB) dstQuad.Blue = Drawing2D.ExtractBlue(vbRGB) @@ -3401,7 +3401,7 @@ End Function Public Function FillLongWithRGBA(ByVal srcR As Long, ByVal srcG As Long, ByVal srcB As Long, ByVal srcA As Long) As Long - Dim dstQuad As RGBQUAD + Dim dstQuad As RGBQuad dstQuad.Red = srcR dstQuad.Green = srcG dstQuad.Blue = srcB @@ -3416,7 +3416,7 @@ End Function 'Given a long-type pARGB value returned from GDI+, retrieve just the opacity value on the scale [0, 100] Public Function GetOpacityFromPARGB(ByVal pARGB As Long) As Single - Dim srcQuad As RGBQUAD + Dim srcQuad As RGBQuad CopyMemory_Strict VarPtr(srcQuad), VarPtr(pARGB), 4& GetOpacityFromPARGB = CSng(srcQuad.Alpha) * CSng(100# / 255#) End Function @@ -3425,7 +3425,7 @@ End Function ' (Note that various GDI+ settings, like brush colors, return their RGBA results as *not* premultiplied.) Public Function GetColorFromPARGB(ByVal pARGB As Long, Optional ByVal removePremultiplication As Boolean = False) As Long - Dim srcQuad As RGBQUAD + Dim srcQuad As RGBQuad CopyMemory_Strict VarPtr(srcQuad), VarPtr(pARGB), 4& If removePremultiplication Then @@ -3468,7 +3468,7 @@ Public Function GetGDIPlusPatternBrushHandle(ByVal brushPattern As GP_PatternSty GdipCreateHatchBrush brushPattern, FillQuadWithVBRGB(bFirstColor, bFirstColorOpacity), FillQuadWithVBRGB(bSecondColor, bSecondColorOpacity), GetGDIPlusPatternBrushHandle End Function -Public Function GetGDIPlusLinearBrushHandle(ByRef srcRect As RECTF, ByVal firstRGBA As Long, ByVal secondRGBA As Long, ByVal gradAngle As Single, ByVal isAngleScalable As Long, ByVal gradientWrapMode As PD_2D_WrapMode) As Long +Public Function GetGDIPlusLinearBrushHandle(ByRef srcRect As RectF, ByVal firstRGBA As Long, ByVal secondRGBA As Long, ByVal gradAngle As Single, ByVal isAngleScalable As Long, ByVal gradientWrapMode As PD_2D_WrapMode) As Long GdipCreateLineBrushFromRectWithAngle srcRect, firstRGBA, secondRGBA, gradAngle, isAngleScalable, gradientWrapMode, GetGDIPlusLinearBrushHandle End Function @@ -3481,7 +3481,7 @@ Public Function GetGDIPlusPathBrushHandle(ByVal hGraphicsPath As Long) As Long End Function Public Function SetGDIPlusPathBrushCenter(ByVal hBrush As Long, ByVal centerX As Single, ByVal centerY As Single) As Long - Dim centerPoint As POINTFLOAT + Dim centerPoint As PointFloat centerPoint.x = centerX centerPoint.y = centerY GdipSetPathGradientCenterPoint hBrush, centerPoint @@ -4111,7 +4111,7 @@ Public Function GDIPlus_DrawImageRectRectI(ByVal dstGraphics As Long, ByVal srcI End Function -Public Function GDIPlus_DrawImagePointsRectF(ByVal dstGraphics As Long, ByVal srcImage As Long, ByRef dstPlgPoints() As POINTFLOAT, ByVal srcX As Single, ByVal srcY As Single, ByVal srcWidth As Single, ByVal srcHeight As Single, Optional ByVal opacityModifier As Single = 1#) As Boolean +Public Function GDIPlus_DrawImagePointsRectF(ByVal dstGraphics As Long, ByVal srcImage As Long, ByRef dstPlgPoints() As PointFloat, ByVal srcX As Single, ByVal srcY As Single, ByVal srcWidth As Single, ByVal srcHeight As Single, Optional ByVal opacityModifier As Single = 1#) As Boolean 'Modified opacity requires us to create a temporary image attributes object Dim imgAttributesHandle As Long @@ -4134,7 +4134,7 @@ Public Function GDIPlus_DrawImagePointsRectF(ByVal dstGraphics As Long, ByVal sr End Function -Public Function GDIPlus_DrawImagePointsRectI(ByVal dstGraphics As Long, ByVal srcImage As Long, ByRef dstPlgPoints() As POINTLONG, ByVal srcX As Long, ByVal srcY As Long, ByVal srcWidth As Long, ByVal srcHeight As Long, Optional ByVal opacityModifier As Single = 1#) As Boolean +Public Function GDIPlus_DrawImagePointsRectI(ByVal dstGraphics As Long, ByVal srcImage As Long, ByRef dstPlgPoints() As PointLong, ByVal srcX As Long, ByVal srcY As Long, ByVal srcWidth As Long, ByVal srcHeight As Long, Optional ByVal opacityModifier As Single = 1#) As Boolean 'Modified opacity requires us to create a temporary image attributes object Dim imgAttributesHandle As Long @@ -4506,7 +4506,7 @@ Public Function GDIPlus_ImageGetResolution(ByVal hImage As Long, ByRef dstHResol End If End Function -Public Function GDIPlus_ImageLockBits(ByVal hImage As Long, ByRef srcRect As RECTL, ByRef srcCopyData As GP_BitmapData, ByVal lockFlags As GP_BitmapLockMode, ByVal dstPixelFormat As GP_PixelFormat) As Boolean +Public Function GDIPlus_ImageLockBits(ByVal hImage As Long, ByRef srcRect As RectL, ByRef srcCopyData As GP_BitmapData, ByVal lockFlags As GP_BitmapLockMode, ByVal dstPixelFormat As GP_PixelFormat) As Boolean Dim tmpReturn As GP_Result tmpReturn = GdipBitmapLockBits(hImage, srcRect, lockFlags, dstPixelFormat, srcCopyData) GDIPlus_ImageLockBits = (tmpReturn = GP_OK) @@ -4992,13 +4992,13 @@ Public Function GDIPlus_PathGetFillRule(ByVal hPath As Long) As GP_FillMode If (tmpReturn <> GP_OK) Then InternalGDIPlusError vbNullString, vbNullString, tmpReturn End Function -Public Function GDIPlus_PathGetPathBoundsF(ByVal hPath As Long, Optional ByVal hTransform As Long = 0, Optional ByVal hPen As Long = 0) As RECTF +Public Function GDIPlus_PathGetPathBoundsF(ByVal hPath As Long, Optional ByVal hTransform As Long = 0, Optional ByVal hPen As Long = 0) As RectF Dim tmpReturn As GP_Result tmpReturn = GdipGetPathWorldBounds(hPath, GDIPlus_PathGetPathBoundsF, hTransform, hPen) If (tmpReturn <> GP_OK) Then InternalGDIPlusError vbNullString, vbNullString, tmpReturn End Function -Public Function GDIPlus_PathGetPathBoundsL(ByVal hPath As Long, Optional ByVal hTransform As Long = 0, Optional ByVal hPen As Long = 0) As RECTL +Public Function GDIPlus_PathGetPathBoundsL(ByVal hPath As Long, Optional ByVal hTransform As Long = 0, Optional ByVal hPen As Long = 0) As RectL Dim tmpReturn As GP_Result tmpReturn = GdipGetPathWorldBoundsI(hPath, GDIPlus_PathGetPathBoundsL, hTransform, hPen) If (tmpReturn <> GP_OK) Then InternalGDIPlusError vbNullString, vbNullString, tmpReturn @@ -5074,11 +5074,11 @@ Public Function GDIPlus_PenSetDashOffset(ByVal hPen As Long, ByVal newOffset As GDIPlus_PenSetDashOffset = (GdipSetPenDashOffset(hPen, newOffset) = GP_OK) End Function -Public Function GDIPlus_RegionAddRectF(ByVal dstRegion As Long, ByRef srcRectF As RECTF, Optional ByVal useCombineMode As GP_CombineMode = GP_CM_Replace) As Boolean +Public Function GDIPlus_RegionAddRectF(ByVal dstRegion As Long, ByRef srcRectF As RectF, Optional ByVal useCombineMode As GP_CombineMode = GP_CM_Replace) As Boolean GDIPlus_RegionAddRectF = (GdipCombineRegionRect(dstRegion, srcRectF, useCombineMode) = GP_OK) End Function -Public Function GDIPlus_RegionAddRectL(ByVal dstRegion As Long, ByRef srcRectL As RECTL, Optional ByVal useCombineMode As GP_CombineMode = GP_CM_Replace) As Boolean +Public Function GDIPlus_RegionAddRectL(ByVal dstRegion As Long, ByRef srcRectL As RectL, Optional ByVal useCombineMode As GP_CombineMode = GP_CM_Replace) As Boolean GDIPlus_RegionAddRectL = (GdipCombineRegionRectI(dstRegion, srcRectL, useCombineMode) = GP_OK) End Function @@ -5097,13 +5097,13 @@ Public Function GDIPlus_RegionClone(ByVal srcRegion As Long, ByRef dstRegion As If (tmpReturn <> GP_OK) Then InternalGDIPlusError vbNullString, vbNullString, tmpReturn End Function -Public Function GDIPlus_RegionGetClipRectF(ByVal srcRegion As Long) As RECTF +Public Function GDIPlus_RegionGetClipRectF(ByVal srcRegion As Long) As RectF Dim tmpReturn As Long tmpReturn = GdipGetRegionBounds(srcRegion, m_TransformGraphics, GDIPlus_RegionGetClipRectF) If (tmpReturn <> GP_OK) Then InternalGDIPlusError vbNullString, vbNullString, tmpReturn End Function -Public Function GDIPlus_RegionGetClipRectI(ByVal srcRegion As Long) As RECTL +Public Function GDIPlus_RegionGetClipRectI(ByVal srcRegion As Long) As RectL Dim tmpReturn As Long tmpReturn = GdipGetRegionBoundsI(srcRegion, m_TransformGraphics, GDIPlus_RegionGetClipRectI) If (tmpReturn <> GP_OK) Then InternalGDIPlusError vbNullString, vbNullString, tmpReturn diff --git a/Modules/Histograms.bas b/Modules/Histograms.bas index 09766309e8..b0dcacae1a 100644 --- a/Modules/Histograms.bas +++ b/Modules/Histograms.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Histograms" '*************************************************************************** 'Histogram Analysis tools -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 13/October/00 'Last updated: 07/September/15 'Last update: start collecting all of PD's various histogram-specific tools into a single location. @@ -38,7 +38,7 @@ Public Sub FillHistogramArrays(ByRef hData() As Double, ByRef hDataLog() As Doub 'Create a local array and point it at the pixel data we want to scan Dim imageData() As Byte - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D EffectPrep.PrepImageData tmpSA, , , , True CopyMemory ByVal VarPtrArray(imageData()), VarPtr(tmpSA), 4 @@ -150,7 +150,7 @@ Public Sub GenerateHistogramImages(ByRef histogramData() As Double, ByRef channe 'The DIBs, however, are fully under our control ReDim dstDIBs(0 To 3) As pdDIB - Dim tmpPath As pd2DPath, histogramShape() As POINTFLOAT + Dim tmpPath As pd2DPath, histogramShape() As PointFloat Dim hColor As Long Dim i As Long, j As Long Dim yMax As Double @@ -198,7 +198,7 @@ Public Sub GenerateHistogramImages(ByRef histogramData() As Double, ByRef channe 'New strategy! Use the awesome pd2DPath class to construct a matching polygon for each histogram. ' Then, stroke and fill the polygon in one fell swoop (much faster). - ReDim histogramShape(0 To 260) As POINTFLOAT + ReDim histogramShape(0 To 260) As PointFloat For j = 0 To 255 histogramShape(j).x = hLookupX(j) diff --git a/Modules/IconsAndCursors.bas b/Modules/IconsAndCursors.bas index 2952368911..c181576bed 100644 --- a/Modules/IconsAndCursors.bas +++ b/Modules/IconsAndCursors.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "IconsAndCursors" '*************************************************************************** 'PhotoDemon Icon and Cursor Handler -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 24/June/12 'Last updated: 03/February/17 'Last update: add automatic high-DPI cursor support for custom cursors created from PNGs diff --git a/Modules/ImageExporter.bas b/Modules/ImageExporter.bas index 57c01b1660..b1d12f7fd9 100644 --- a/Modules/ImageExporter.bas +++ b/Modules/ImageExporter.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "ImageExporter" '*************************************************************************** 'Low-level image export interfaces -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 4/15/01 'Last updated: 14/March/16 'Last update: migrate various functions out of the high-level "Saving" module and into this new, format-specific module diff --git a/Modules/ImageLoader.bas b/Modules/ImageLoader.bas index b773016dd6..c288787ad2 100644 --- a/Modules/ImageLoader.bas +++ b/Modules/ImageLoader.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "ImageImporter" '*************************************************************************** 'Low-level image import interfaces -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 4/15/01 'Last updated: 09/March/16 'Last update: migrate various functions out of the high-level "Loading" module and into this new, format-specific module diff --git a/Modules/Interface.bas b/Modules/Interface.bas index 3b602874a4..949336f49e 100644 --- a/Modules/Interface.bas +++ b/Modules/Interface.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Interface" '*************************************************************************** 'Miscellaneous Functions Related to the User Interface -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 6/12/01 'Last updated: 17/August/17 'Last update: overhaul PDMsgBox to use an internal renderer diff --git a/Modules/Layers.bas b/Modules/Layers.bas index cc44284b2f..13c5579195 100644 --- a/Modules/Layers.bas +++ b/Modules/Layers.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Layers" '*************************************************************************** 'Layer Interface -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 24/March/14 'Last updated: 04/July/14 'Last update: added eraseLayerByIndex() function diff --git a/Modules/Loading.bas b/Modules/Loading.bas index 1f47c6b74c..5c25eb1557 100644 --- a/Modules/Loading.bas +++ b/Modules/Loading.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Loading" '*************************************************************************** 'General-purpose image and data import interface -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 4/15/01 'Last updated: 10/September/17 'Last update: fix a potential activation issue when a paint tool is selected, and a new image is loaded, and we diff --git a/Modules/Main.bas b/Modules/Main.bas index 7f90e58daa..08d934b063 100644 --- a/Modules/Main.bas +++ b/Modules/Main.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "MainModule" '*************************************************************************** 'PhotoDemon Startup Module -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 03/March/14 'Last updated: 31/January/17 'Last update: continued work on improving program startup time diff --git a/Modules/Menus.bas b/Modules/Menus.bas index 4a0ca6a66b..747c4e9aab 100644 --- a/Modules/Menus.bas +++ b/Modules/Menus.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Menus" '*************************************************************************** 'Specialized Math Routines -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 11/January/17 'Last updated: 15/August/17 'Last update: implement manual handling of Unicode menu captions diff --git a/Modules/NavKey.bas b/Modules/NavKey.bas index d4f24a1b75..73eeb2cc72 100644 --- a/Modules/NavKey.bas +++ b/Modules/NavKey.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "NavKey" '*************************************************************************** 'Navigation Key Handler (including automated tab order handling) -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 18/August/17 'Last updated: 22/August/17 'Last update: continuing work on initial build diff --git a/Modules/OS.bas b/Modules/OS.bas index 6ce57759d2..d679c98dc5 100644 --- a/Modules/OS.bas +++ b/Modules/OS.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "OS" '*************************************************************************** 'OS-specific specific features -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 21/November/13 'Last updated: 18/July/17 'Last update: migrate various OS-specific bits to this module diff --git a/Modules/PDMath.bas b/Modules/PDMath.bas index 4806ad9643..bf5b401a91 100644 --- a/Modules/PDMath.bas +++ b/Modules/PDMath.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "PDMath" '*************************************************************************** 'Specialized Math Routines -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 13/June/13 'Last updated: 12/January/17 'Last update: added two optimized Atan2() variants, each with trade-offs between accuracy and performance. @@ -25,7 +25,7 @@ Public Const PI_14 As Double = 0.785398163397448 Public Const PI_34 As Double = 2.35619449019234 Private Declare Function PtInRect Lib "user32" (ByRef lpRect As RECT, ByVal x As Long, ByVal y As Long) As Long -Private Declare Function PtInRectL Lib "user32" Alias "PtInRect" (ByRef lpRect As RECTL, ByVal x As Long, ByVal y As Long) As Long +Private Declare Function PtInRectL Lib "user32" Alias "PtInRect" (ByRef lpRect As RectL, ByVal x As Long, ByVal y As Long) As Long 'See if a point lies inside a rect (integer) Public Function IsPointInRect(ByVal ptX As Long, ByVal ptY As Long, ByRef srcRect As RECT) As Boolean @@ -33,12 +33,12 @@ Public Function IsPointInRect(ByVal ptX As Long, ByVal ptY As Long, ByRef srcRec End Function 'See if a point lies inside a RectL struct -Public Function IsPointInRectL(ByVal ptX As Long, ByVal ptY As Long, ByRef srcRect As RECTL) As Boolean +Public Function IsPointInRectL(ByVal ptX As Long, ByVal ptY As Long, ByRef srcRect As RectL) As Boolean IsPointInRectL = (PtInRectL(srcRect, ptX, ptY) <> 0) End Function 'See if a point lies inside a rect (float) -Public Function IsPointInRectF(ByVal ptX As Long, ByVal ptY As Long, ByRef srcRect As RECTF) As Boolean +Public Function IsPointInRectF(ByVal ptX As Long, ByVal ptY As Long, ByRef srcRect As RectF) As Boolean With srcRect If (ptX >= .Left) And (ptX <= (.Left + .Width)) Then IsPointInRectF = ((ptY >= .Top) And (ptY <= (.Top + .Height))) @@ -49,7 +49,7 @@ Public Function IsPointInRectF(ByVal ptX As Long, ByVal ptY As Long, ByRef srcRe End Function 'Find the union rect of two floating-point rects. (This is the smallest rect that contains both rects.) -Public Sub UnionRectF(ByRef dstRect As RECTF, ByRef srcRect As RECTF, ByRef srcRect2 As RECTF, Optional ByVal widthAndHeightAreReallyRightAndBottom As Boolean = False) +Public Sub UnionRectF(ByRef dstRect As RectF, ByRef srcRect As RectF, ByRef srcRect2 As RectF, Optional ByVal widthAndHeightAreReallyRightAndBottom As Boolean = False) 'Union rects are easy: find the min top/left, and the max bottom/right With dstRect @@ -111,7 +111,7 @@ Public Sub UnionRectF(ByRef dstRect As RECTF, ByRef srcRect As RECTF, ByRef srcR End Sub -Public Function AreRectFsEqual(ByRef srcRectF1 As RECTF, ByRef srcRectf2 As RECTF) As Boolean +Public Function AreRectFsEqual(ByRef srcRectF1 As RectF, ByRef srcRectf2 As RectF) As Boolean AreRectFsEqual = VBHacks.MemCmp(VarPtr(srcRectF1), VarPtr(srcRectf2), LenB(srcRectF1)) End Function @@ -263,7 +263,7 @@ Public Function Distance3D_FastFloat(ByRef x1 As Single, ByRef y1 As Single, ByR End Function 'Given two intersecting lines, return the angle between them (e.g. the inner product: https://en.wikipedia.org/wiki/Inner_product_space) -Public Function AngleBetweenTwoIntersectingLines(ByRef ptIntersect As POINTFLOAT, ByRef pt1 As POINTFLOAT, ByRef pt2 As POINTFLOAT, Optional ByVal returnResultInDegrees As Boolean = True) As Double +Public Function AngleBetweenTwoIntersectingLines(ByRef ptIntersect As PointFloat, ByRef pt1 As PointFloat, ByRef pt2 As PointFloat, Optional ByVal returnResultInDegrees As Boolean = True) As Double Dim dx1i As Double, dy1i As Double, dx2i As Double, dy2i As Double dx1i = pt1.x - ptIntersect.x @@ -471,7 +471,7 @@ End Function 'Given an array of points (in floating-point format), find the closest one to a target location. If none fall below a minimum distance threshold, ' return -1. (This function is used by many bits of mouse interaction code, to see if the user has clicked on something interesting.) -Public Function FindClosestPointInFloatArray(ByVal targetX As Single, ByVal targetY As Single, ByVal minAllowedDistance As Single, ByRef poiArray() As POINTFLOAT) As Long +Public Function FindClosestPointInFloatArray(ByVal targetX As Single, ByVal targetY As Single, ByVal minAllowedDistance As Single, ByRef poiArray() As PointFloat) As Long Dim curMinDistance As Double, curMinIndex As Long curMinDistance = &HFFFFFFF @@ -516,12 +516,12 @@ Public Function Min2Int(ByVal l1 As Long, ByVal l2 As Long) As Long If (l1 < l2) Then Min2Int = l1 Else Min2Int = l2 End Function -Public Function Max2Float_Single(ByVal f1 As Single, ByVal f2 As Single) As Single - If (f1 > f2) Then Max2Float_Single = f1 Else Max2Float_Single = f2 +Public Function Max2Float_Single(ByVal f1 As Single, ByVal F2 As Single) As Single + If (f1 > F2) Then Max2Float_Single = f1 Else Max2Float_Single = F2 End Function -Public Function Min2Float_Single(ByVal f1 As Single, ByVal f2 As Single) As Single - If (f1 < f2) Then Min2Float_Single = f1 Else Min2Float_Single = f2 +Public Function Min2Float_Single(ByVal f1 As Single, ByVal F2 As Single) As Single + If (f1 < F2) Then Min2Float_Single = f1 Else Min2Float_Single = F2 End Function 'Return the maximum of three floating point values. (PD commonly uses this for colors, hence the RGB notation.) @@ -645,7 +645,7 @@ Public Function NearestInt(ByVal srcFloat As Single) As Long End Function 'Given an array of points (in floating-point format), calculate the center point of the bounding rect. -Public Sub FindCenterOfFloatPoints(ByRef dstPoint As POINTFLOAT, ByRef srcPoints() As POINTFLOAT) +Public Sub FindCenterOfFloatPoints(ByRef dstPoint As PointFloat, ByRef srcPoints() As PointFloat) Dim curMinX As Single, curMinY As Single, curMaxX As Single, curMaxY As Single curMinX = 9999999: curMaxX = -9999999: curMinY = 9999999: curMaxY = -9999999 @@ -725,7 +725,7 @@ Public Sub FindBoundarySizeOfRotatedRect(ByVal srcWidth As Double, ByVal srcHeig End Sub 'Given a rectangle (as defined by width and height, not position), calculate new corner positions as an array of PointF structs. -Public Sub FindCornersOfRotatedRect(ByVal srcWidth As Double, ByVal srcHeight As Double, ByVal rotateAngle As Double, ByRef dstPoints() As POINTFLOAT, Optional ByVal arrayAlreadyDimmed As Boolean = False) +Public Sub FindCornersOfRotatedRect(ByVal srcWidth As Double, ByVal srcHeight As Double, ByVal rotateAngle As Double, ByRef dstPoints() As PointFloat, Optional ByVal arrayAlreadyDimmed As Boolean = False) 'Convert the rotation angle to radians rotateAngle = rotateAngle * (PI_DIV_180) @@ -767,7 +767,7 @@ Public Sub FindCornersOfRotatedRect(ByVal srcWidth As Double, ByVal srcHeight As y41 = -x4 * sinTheta + y4 * cosTheta 'Fill the destination array with the rotated points, translated back into the original coordinate space for convenience - If (Not arrayAlreadyDimmed) Then ReDim dstPoints(0 To 3) As POINTFLOAT + If (Not arrayAlreadyDimmed) Then ReDim dstPoints(0 To 3) As PointFloat dstPoints(0).x = x11 + halfWidth dstPoints(0).y = y11 + halfHeight dstPoints(1).x = x21 + halfWidth @@ -807,7 +807,7 @@ End Function 'Given a RectF object, enlarge the boundaries to produce an integer-only RectF that is guaranteed ' to encompass the entire original rect. (Said another way, the modified rect will *never* be smaller ' than the original rect.) -Public Sub GetIntClampedRectF(ByRef srcRectF As RECTF) +Public Sub GetIntClampedRectF(ByRef srcRectF As RectF) Dim xOffset As Single, yOffset As Single xOffset = srcRectF.Left - Int(srcRectF.Left) yOffset = srcRectF.Top - Int(srcRectF.Top) @@ -820,7 +820,7 @@ End Sub 'Given a RectF object, adjust the boundaries to produce an integer-only RectF that approximates the ' original rect as closely as possible. (This rect *may* be smaller than the original; for a rect ' guaranteed to encompass the entire original area, use GetIntClampedRectF(), above.) -Public Sub GetNearestIntRectF(ByRef srcRectF As RECTF) +Public Sub GetNearestIntRectF(ByRef srcRectF As RectF) Dim xOffset As Single, yOffset As Single xOffset = PDMath.Frac(srcRectF.Left) yOffset = PDMath.Frac(srcRectF.Top) diff --git a/Modules/Paintbrush.bas b/Modules/Paintbrush.bas index b8d6e68fd2..271c413b4e 100644 --- a/Modules/Paintbrush.bas +++ b/Modules/Paintbrush.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Paintbrush" '*************************************************************************** 'Paintbrush tool interface -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 1/November/16 'Last updated: 15/December/16 'Last update: ongoing performance improvements @@ -123,7 +123,7 @@ Private m_BrushSpacingCheck As Long 'If you want the absolute modified area since the stroke began, you can use m_TotalModifiedRectF, which is not ' cleared until the current stroke is released. Private m_UnionRectRequired As Boolean -Private m_ModifiedRectF As RECTF, m_TotalModifiedRectF As RECTF +Private m_ModifiedRectF As RectF, m_TotalModifiedRectF As RectF 'The number of mouse events in the *current* brush stroke. This value is reset after every mouse release. ' The compositor uses this to know when to fully regenerate the paint cache from scratch. @@ -460,7 +460,7 @@ Private Sub CreateSoftBrushReference_MyPaint() 'Prep manual per-pixel loop variables Dim dstImageData() As Long - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D PrepSafeArray_Long tmpSA, m_SrcPenDIB CopyMemory ByVal VarPtrArray(dstImageData()), VarPtr(tmpSA), 4 @@ -588,7 +588,7 @@ Private Sub CreateSoftBrushReference_PD() 'Prep manual per-pixel loop variables Dim dstImageData() As Long - Dim tmpSA As SAFEARRAY2D + Dim tmpSA As SafeArray2D If tmpBrushRequired Then Set tmpDIB = New pdDIB @@ -1183,7 +1183,7 @@ End Sub Private Sub UpdateModifiedRect(ByVal newX As Single, ByVal newY As Single, ByVal isFirstStroke As Boolean) 'Start by calculating the affected rect for just this stroke. - Dim tmpRectF As RECTF + Dim tmpRectF As RectF If (newX < m_MouseX) Then tmpRectF.Left = newX tmpRectF.Width = m_MouseX - newX @@ -1212,7 +1212,7 @@ Private Sub UpdateModifiedRect(ByVal newX As Single, ByVal newY As Single, ByVal tmpRectF.Width = tmpRectF.Width + halfBrushSize tmpRectF.Height = tmpRectF.Height + halfBrushSize - Dim tmpOldRectF As RECTF + Dim tmpOldRectF As RectF 'If this is *not* the first modified rect calculation, union this rect with our previous update rect If m_UnionRectRequired And (Not isFirstStroke) Then @@ -1237,7 +1237,7 @@ End Sub ' this function, but this behavior can be toggled by resetRectAfter. Also, if you want to get the full modified rect since this ' paint stroke began, you can set the GetModifiedRectSinceStrokeBegan parameter to TRUE. Note that when ' GetModifiedRectSinceStrokeBegan is TRUE, the resetRectAfter parameter is ignored. -Public Function GetModifiedUpdateRectF(Optional ByVal resetRectAfter As Boolean = True, Optional ByVal GetModifiedRectSinceStrokeBegan As Boolean = False) As RECTF +Public Function GetModifiedUpdateRectF(Optional ByVal resetRectAfter As Boolean = True, Optional ByVal GetModifiedRectSinceStrokeBegan As Boolean = False) As RectF If GetModifiedRectSinceStrokeBegan Then GetModifiedUpdateRectF = m_TotalModifiedRectF Else @@ -1257,7 +1257,7 @@ Public Sub CommitBrushResults() m_NumOfMouseEvents = 0 'Make a local copy of the paintbrush's bounding rect, and clip it to the layer's boundaries - Dim tmpRectF As RECTF + Dim tmpRectF As RectF tmpRectF = m_TotalModifiedRectF With tmpRectF @@ -1279,10 +1279,10 @@ Public Sub CommitBrushResults() End With pdImages(g_CurrentImage).MergeTwoLayers pdImages(g_CurrentImage).ScratchLayer, pdImages(g_CurrentImage).GetActiveLayer, bottomLayerFullSize, True, VarPtr(tmpRectF) - pdImages(g_CurrentImage).NotifyImageChanged UNDO_LAYER, pdImages(g_CurrentImage).GetActiveLayerIndex + pdImages(g_CurrentImage).NotifyImageChanged UNDO_Layer, pdImages(g_CurrentImage).GetActiveLayerIndex 'Ask the central processor to create Undo/Redo data for us - Processor.Process "Paint stroke", , , UNDO_LAYER, g_CurrentTool + Processor.Process "Paint stroke", , , UNDO_Layer, g_CurrentTool 'Reset the scratch layer pdImages(g_CurrentImage).ScratchLayer.layerDIB.ResetDIB 0 @@ -1313,13 +1313,13 @@ Public Sub CommitBrushResults() pdImages(g_CurrentImage).SetActiveLayerByID newLayerID 'Notify the parent image of the new layer - pdImages(g_CurrentImage).NotifyImageChanged UNDO_IMAGE_VECTORSAFE + pdImages(g_CurrentImage).NotifyImageChanged UNDO_Image_VectorSafe 'Redraw the layer box, and note that thumbnails need to be re-cached toolbar_Layers.NotifyLayerChange 'Ask the central processor to create Undo/Redo data for us - Processor.Process "Paint stroke", , , UNDO_IMAGE_VECTORSAFE, g_CurrentTool + Processor.Process "Paint stroke", , , UNDO_Image_VectorSafe, g_CurrentTool 'Create a new scratch layer Tools.InitializeToolsDependentOnImage diff --git a/Modules/Palettes.bas b/Modules/Palettes.bas index 5ccb0ae5a6..0c43045504 100644 --- a/Modules/Palettes.bas +++ b/Modules/Palettes.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Palettes" '*************************************************************************** 'PhotoDemon's Master Palette Interface -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 12/January/17 'Last updated: 15/January/17 'Last update: add the WAPI palette matching function, which is quite a bit faster than our naive version. diff --git a/Modules/Plugin_EZTwain.bas b/Modules/Plugin_EZTwain.bas index 3484063294..71a67613eb 100644 --- a/Modules/Plugin_EZTwain.bas +++ b/Modules/Plugin_EZTwain.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Plugin_EZTwain" '*************************************************************************** 'Scanner Interface -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 1/10/01 'Last updated: 12/May/16 'Last update: clean up the interface a bit diff --git a/Modules/Plugin_ExifTool.bas b/Modules/Plugin_ExifTool.bas index 446182a1c5..452a168e67 100644 --- a/Modules/Plugin_ExifTool.bas +++ b/Modules/Plugin_ExifTool.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "ExifTool" '*************************************************************************** 'ExifTool Plugin Interface -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 24/May/13 'Last updated: 08/April/16 'Last update: mass overhaul in conjunction with building the Metadata Editor dialog diff --git a/Modules/Plugin_FreeImage.bas b/Modules/Plugin_FreeImage.bas index 9c78f2f892..2fef18bb0d 100644 --- a/Modules/Plugin_FreeImage.bas +++ b/Modules/Plugin_FreeImage.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Plugin_FreeImage" '*************************************************************************** 'FreeImage Interface (Advanced) -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 3/September/12 'Last updated: 08/August/17 'Last update: migrate all tone-mapping code to XML params; new performance improvements for tone-mapping diff --git a/Modules/Plugin_LittleCMS.bas b/Modules/Plugin_LittleCMS.bas index af1b1f951a..627d2af3ab 100644 --- a/Modules/Plugin_LittleCMS.bas +++ b/Modules/Plugin_LittleCMS.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "LittleCMS" '*************************************************************************** 'LittleCMS Interface -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 21/April/16 'Last updated: 09/June/16 'Last update: continued feature expansion diff --git a/Modules/Plugin_Management.bas b/Modules/Plugin_Management.bas index 7206765e91..8ede640910 100644 --- a/Modules/Plugin_Management.bas +++ b/Modules/Plugin_Management.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "PluginManager" '*************************************************************************** 'Core Plugin Manager -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 30/August/15 'Last updated: 01/December/16 'Last update: integrate zstd as a permanent plugin diff --git a/Modules/Plugin_OptiPNG.bas b/Modules/Plugin_OptiPNG.bas index 90dc2341d6..28b20f4ce1 100644 --- a/Modules/Plugin_OptiPNG.bas +++ b/Modules/Plugin_OptiPNG.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Plugin_OptiPNG" '*************************************************************************** 'OptiPNG Interface -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 20/April/16 'Last updated: 20/April/16 'Last update: initial build diff --git a/Modules/Plugin_PNGQuant.bas b/Modules/Plugin_PNGQuant.bas index 1f3840d7ed..7fc0d39016 100644 --- a/Modules/Plugin_PNGQuant.bas +++ b/Modules/Plugin_PNGQuant.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Plugin_PNGQuant" '*************************************************************************** 'PNGQuant Interface (formerly pngnq-s9 interface) -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 19/December/12 'Last updated: 02/July/14 'Last update: migrate all plugin support to the official pngquant library. Work on pngnq-s9 has pretty much diff --git a/Modules/Plugin_ZLib.bas b/Modules/Plugin_ZLib.bas index 526d917ae3..41b7d2868f 100644 --- a/Modules/Plugin_ZLib.bas +++ b/Modules/Plugin_ZLib.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Plugin_zLib" '*************************************************************************** 'File Compression Interface (via zLib) -'Copyright 2002-2017 by Tanner Helland +'Copyright 2002-2018 by Tanner Helland 'Created: 3/02/02 'Last updated: 08/December/16 'Last update: general code clean-up to better integrate with the new Compression wrapper module diff --git a/Modules/Plugin_lz4.bas b/Modules/Plugin_lz4.bas index de35300ff3..ef942b1bef 100644 --- a/Modules/Plugin_lz4.bas +++ b/Modules/Plugin_lz4.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Plugin_lz4" '*************************************************************************** 'Lz4 Compression Library Interface -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 04/December/16 'Last updated: 07/December/16 'Last update: add LZ4_HC compression algorithm. (LZ4_HC has no special decompression algorithm; diff --git a/Modules/Plugin_zstd.bas b/Modules/Plugin_zstd.bas index ea692e85c8..217226e8d8 100644 --- a/Modules/Plugin_zstd.bas +++ b/Modules/Plugin_zstd.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Plugin_zstd" '*************************************************************************** 'Zstd Compression Library Interface -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 01/December/16 'Last updated: 04/December/16 'Last update: wrap up initial build diff --git a/Modules/Printing.bas b/Modules/Printing.bas index 915e385276..e5b079c9e5 100644 --- a/Modules/Printing.bas +++ b/Modules/Printing.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Printing" '*************************************************************************** 'Printer support functions -'Copyright 2003-2017 by Tanner Helland +'Copyright 2003-2018 by Tanner Helland 'Created: 4/April/03 'Last updated: 09/August/14 'Last update: perform necessary cleanup for printer temp files in Vista+ diff --git a/Modules/Processor.bas b/Modules/Processor.bas index a418801f74..7344d9263b 100644 --- a/Modules/Processor.bas +++ b/Modules/Processor.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Processor" '*************************************************************************** 'Program Sub-Processor and Error Handler -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 4/15/01 'Last updated: 08/August/17 'Last update: finish migrating *every last damn function* to XML params. For the first time in history, diff --git a/Modules/ProgressBars.bas b/Modules/ProgressBars.bas index 1644cc0801..de7cc0be68 100644 --- a/Modules/ProgressBars.bas +++ b/Modules/ProgressBars.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "ProgressBars" '*************************************************************************** 'Miscellaneous Functions Related to the Progress Bar -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 6/12/01 'Last updated: 13/February/13 'Last update: Rewrite the progress bar code against an API progress bar on the main canvas object diff --git a/Modules/PublicConstants.bas b/Modules/PublicConstants.bas index e3c1734a28..dd42ce9185 100644 --- a/Modules/PublicConstants.bas +++ b/Modules/PublicConstants.bas @@ -21,7 +21,7 @@ End Enum ' segments through the program, including the bulk of PD's debugging code. ' ' Obvious corollary: ALWAYS SET DEBUGMODE TO 0 IN PRODUCTION BUILDS! -Public Const PD_BUILD_QUALITY As Long = PD_PRE_ALPHA +Public Const PD_BUILD_QUALITY As Long = PD_PRODUCTION 'Identifier for various PD-specific file types Public Const PD_IMAGE_IDENTIFIER As Long = &H44494450 'pdImage data (ASCII characters "PDID", as hex, little-endian) diff --git a/Modules/Saving.bas b/Modules/Saving.bas index a1c1bfd076..7c64dc6302 100644 --- a/Modules/Saving.bas +++ b/Modules/Saving.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Saving" '*************************************************************************** 'File Saving Interface -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 4/15/01 'Last updated: 08/March/16 'Last update: refactor various bits of save-related code to make PD's primary save functions much more versatile. diff --git a/Modules/ScreenCapture.bas b/Modules/ScreenCapture.bas index 0fb12f8e39..bf4707baf5 100644 --- a/Modules/ScreenCapture.bas +++ b/Modules/ScreenCapture.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "ScreenCapture" '*************************************************************************** 'Screen Capture Interface -'Copyright 1999-2017 by Tanner Helland +'Copyright 1999-2018 by Tanner Helland 'Created: 12/June/99 'Last updated: 10/November/17 'Last update: workarounds for Win 10 PrintWindow fails; some windows may be recoverable with a manual diff --git a/Modules/Selections.bas b/Modules/Selections.bas index 040a47a3fe..1835e5f22a 100644 --- a/Modules/Selections.bas +++ b/Modules/Selections.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Selections" '*************************************************************************** 'Selection Interface -'Copyright 2013-2017 by Tanner Helland +'Copyright 2013-2018 by Tanner Helland 'Created: 21/June/13 'Last updated: 03/March/17 'Last update: large-scale overhaul to match new 7.0 features and changes in pdSelection. diff --git a/Modules/Strings.bas b/Modules/Strings.bas index 87037d3f84..676a1da2b8 100644 --- a/Modules/Strings.bas +++ b/Modules/Strings.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Strings" '*************************************************************************** 'Additional string support functions -'Copyright 2017-2017 by Tanner Helland +'Copyright 2017-2018 by Tanner Helland 'Created: 13/June/17 'Last updated: 24/October/17 'Last update: fix some inexplicable issues with WideCharToMultiByte(); comments are in the UTF-8 conversion functions diff --git a/Modules/TextSupport.bas b/Modules/TextSupport.bas index 3ed0730ef5..7fc8ddcbbd 100644 --- a/Modules/TextSupport.bas +++ b/Modules/TextSupport.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "TextSupport" '*************************************************************************** 'Miscellaneous functions related to specialized text handling -'Copyright 2000-2017 by Tanner Helland +'Copyright 2000-2018 by Tanner Helland 'Created: 6/12/01 'Last updated: 08/August/17 'Last update: remove legacy BuildParams() parameter system diff --git a/Modules/Toolboxes.bas b/Modules/Toolboxes.bas index d96aae6dc2..a2f962e0d6 100644 --- a/Modules/Toolboxes.bas +++ b/Modules/Toolboxes.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Toolboxes" '*************************************************************************** 'Toolbox Manager -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 6/12/01 'Last updated: 06/March/16 'Last update: split toolbox-specific code out of the (now very large) Interface module and into this dedicated home. diff --git a/Modules/Tools.bas b/Modules/Tools.bas index 97124ccb71..d647c85f43 100644 --- a/Modules/Tools.bas +++ b/Modules/Tools.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Tools" '*************************************************************************** 'Helper functions for various PhotoDemon tools -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 06/February/14 'Last updated: 25/June/14 'Last update: add new makeQuickFixesPermanent() function @@ -32,8 +32,8 @@ Private m_InitHScroll As Long, m_InitVScroll As Long 'Finally, the initial mouse x/y values are also supplied, in case they are needed later on. (We call these m_InitImageX/Y as a ' reminder that they exist in the *image* coordinate space, not the *canvas* coordinate space.) We also make a copy of these values ' in the current layer's coordinate space (e.g. with affine transforms considered) -Private m_InitLayerCoords_Transformed(0 To 3) As POINTFLOAT -Private m_InitLayerCoords_Pure(0 To 3) As POINTFLOAT +Private m_InitLayerCoords_Transformed(0 To 3) As PointFloat +Private m_InitLayerCoords_Pure(0 To 3) As PointFloat Private m_LayerAspectRatio As Double Private m_InitImageX As Double, m_InitImageY As Double, m_InitLayerX As Single, m_InitLayerY As Single Private m_InitLayerRotateCenterX As Single, m_InitLayerRotateCenterY As Single @@ -292,7 +292,7 @@ Public Sub TransformCurrentLayer(ByVal curImageX As Double, ByVal curImageY As D 'Layer rotation is different because it involves finding the angle between two lines; specifically, the angle between ' a flat origin line and the current node-to-origin line of the rotation node. - Dim ptIntersect As POINTFLOAT, pt1 As POINTFLOAT, pt2 As POINTFLOAT + Dim ptIntersect As PointFloat, pt1 As PointFloat, pt2 As PointFloat 'The intersect point is the center of the image. This point is the same for all rotation nodes. ptIntersect.x = m_InitLayerCoords_Pure(0).x + (m_InitLayerCoords_Pure(3).x - m_InitLayerCoords_Pure(0).x) / 2 @@ -394,11 +394,11 @@ Public Sub TransformCurrentLayer(ByVal curImageX As Double, ByVal curImageY As D If finalizeTransform Then 'Note the layer's "proper" center of rotation, in absolute image coordinates - Dim tmpPoints() As POINTFLOAT - ReDim tmpPoints(0 To 3) As POINTFLOAT + Dim tmpPoints() As PointFloat + ReDim tmpPoints(0 To 3) As PointFloat srcLayer.GetLayerCornerCoordinates tmpPoints - Dim curCenter As POINTFLOAT + Dim curCenter As PointFloat PDMath.FindCenterOfFloatPoints curCenter, tmpPoints 'Reset the layer's center of rotation @@ -408,7 +408,7 @@ Public Sub TransformCurrentLayer(ByVal curImageX As Double, ByVal curImageY As D 'Resetting the rotational point will cause the layer to "jump" to a new position. Retrieve the ' layer's new center of rotation, in absolute coordinates. srcLayer.GetLayerCornerCoordinates tmpPoints - Dim newCenter As POINTFLOAT + Dim newCenter As PointFloat PDMath.FindCenterOfFloatPoints newCenter, tmpPoints 'Apply new (x, y) layer offsets to ensure that the layer's on-screen position hasn't changed diff --git a/Modules/Uniscribe.bas b/Modules/Uniscribe.bas index 4e043a8c28..8d4f0c5b8c 100644 --- a/Modules/Uniscribe.bas +++ b/Modules/Uniscribe.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Uniscribe" '*************************************************************************** 'Uniscribe API Types -'Copyright 2015-2017 by Tanner Helland +'Copyright 2015-2018 by Tanner Helland 'Created: 14/May/15 'Last updated: 01/June/16 'Last update: construct a new dynamic cache when retrieving script properties; this greatly improves performance for diff --git a/Modules/Units.bas b/Modules/Units.bas index 7a8c3cbbd6..aa46f3e275 100644 --- a/Modules/Units.bas +++ b/Modules/Units.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Units" '*************************************************************************** 'Unit Conversion Functions -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 10/February/14 'Last updated: 30/December/14 'Last update: harden code against potential divide-by-zero errors diff --git a/Modules/UpdateEngine.bas b/Modules/UpdateEngine.bas index 5f099ee93b..ab5f2372b4 100644 --- a/Modules/UpdateEngine.bas +++ b/Modules/UpdateEngine.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "Updates" '*************************************************************************** 'Automatic Software Updater -'Copyright 2012-2017 by Tanner Helland +'Copyright 2012-2018 by Tanner Helland 'Created: 19/August/12 'Last updated: 13/December/17 'Last update: clean up code, improve debug reporting, switch to https for patch downloads @@ -676,6 +676,7 @@ Public Function GetPhotoDemonVersion() As String 'Even-numbered releases are "official" releases, so simply return the full version string If (CLng(App.Minor) Mod 2 = 0) Then GetPhotoDemonVersion = App.Major & "." & App.Minor + If (App.Revision <> 0) Then GetPhotoDemonVersion = GetPhotoDemonVersion & "." & App.Revision Else diff --git a/Modules/UserControl_Support.bas b/Modules/UserControl_Support.bas index 2dbb94b481..56aaee7fa7 100644 --- a/Modules/UserControl_Support.bas +++ b/Modules/UserControl_Support.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "UserControls" '*************************************************************************** 'Helper functions for various PhotoDemon UCs -'Copyright 2014-2017 by Tanner Helland +'Copyright 2014-2018 by Tanner Helland 'Created: 06/February/14 'Last updated: 20/August/15 'Last update: start migrating various UC-inspecific functions here diff --git a/Modules/VB_Hacks.bas b/Modules/VB_Hacks.bas index 56d74e9979..8939d99f91 100644 --- a/Modules/VB_Hacks.bas +++ b/Modules/VB_Hacks.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "VBHacks" '*************************************************************************** 'Misc VB6 Hacks -'Copyright 2016-2017 by Tanner Helland +'Copyright 2016-2018 by Tanner Helland 'Created: 06/January/16 'Last updated: 06/February/17 'Last update: add support for window subclassing via built-in WAPI functions; I'm migrating PD to this faster diff --git a/Modules/ViewportEngine.bas b/Modules/ViewportEngine.bas index ca7c0b3150..4e2637b629 100644 --- a/Modules/ViewportEngine.bas +++ b/Modules/ViewportEngine.bas @@ -1,7 +1,7 @@ Attribute VB_Name = "ViewportEngine" '*************************************************************************** 'Viewport Handler - builds and draws the image viewport and associated scroll bars -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 4/15/01 'Last updated: 29/November/16 'Last update: reinstate all color management code under LittleCMS (instead of the Windows ICM engine, which is a hot mess) diff --git a/Modules/Web.bas b/Modules/Web.bas index a143b32c1c..f574e188a7 100644 --- a/Modules/Web.bas +++ b/Modules/Web.bas @@ -1,9 +1,9 @@ Attribute VB_Name = "Web" '*************************************************************************** 'Internet helper functions -'Copyright 2001-2017 by Tanner Helland +'Copyright 2001-2018 by Tanner Helland 'Created: 6/12/01 -'Last updated: 12/July/2017 +'Last updated: 12/July/17 'Last update: reorganize the Files module to place web-related stuff here. ' 'PhotoDemon doesn't provide much Internet interop, but when it does, the required functions can be found here. diff --git a/PhotoDemon.vbp b/PhotoDemon.vbp index 86093a3938..f7e9fb36cc 100644 --- a/PhotoDemon.vbp +++ b/PhotoDemon.vbp @@ -392,16 +392,16 @@ HelpContextID="0" Description="PhotoDemon Photo Editor" CompatibleMode="0" MajorVer=7 -MinorVer=1 -RevisionVer=32 -AutoIncrementVer=1 +MinorVer=0 +RevisionVer=1 +AutoIncrementVer=0 ServerSupportFiles=0 VersionComments="Copyright 2000-2017 Tanner Helland - photodemon.org" VersionCompanyName="photodemon.org" VersionFileDescription="PhotoDemon Photo Editor" VersionLegalCopyright="Copyright 2000-2017 by Tanner Helland and Contributors" VersionProductName="PhotoDemon Photo Editor" -CondComp="DEBUGMODE = 1" +CondComp="DEBUGMODE = 0" CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=-1 diff --git a/README.md b/README.md index 934090be6c..a37c35829a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# PhotoDemon 7.0 +# PhotoDemon 7.0.1 ![Screenshot](http://photodemon.org/images/PD_70_b1.jpg) diff --git a/Resources/PD_icons.RES b/Resources/PD_icons.RES index b5cbbdf47d..8812aa85bc 100644 Binary files a/Resources/PD_icons.RES and b/Resources/PD_icons.RES differ