Skip to content

Commit

Permalink
Test build for 7.0.1 stability and bug-fix release
Browse files Browse the repository at this point in the history
While I was here, I updated copyright years to 2018.  (Hence the large
number of affected files.)

I've also updated the version reporter to properly report stable build
stability updates, e.g. "7.0.1" is now listed as the version number
instead of silently being modified to "7.0".  This should help with bug
reporting as I won't need users to dive into property pages to see
precise version numbers.
  • Loading branch information
tannerhelland committed Jan 15, 2018
1 parent 342fb3b commit 46d4d48
Show file tree
Hide file tree
Showing 371 changed files with 1,010 additions and 1,019 deletions.
2 changes: 1 addition & 1 deletion Classes/cGoogleTranslate.cls
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Classes/pd2DBrush.cls
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Classes/pd2DGradient.cls
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 17 additions & 17 deletions Classes/pd2DPainter.cls
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
Expand Down
34 changes: 17 additions & 17 deletions Classes/pd2DPath.cls
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Classes/pd2DPen.cls
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions Classes/pd2DRegion.cls
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit 46d4d48

Please sign in to comment.