[commit] r2794 - trunk/GME/Gme

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Mon Apr 5 11:25:51 CDT 2021


Author: ksmyth
Date: Mon Apr  5 11:25:51 2021
New Revision: 2794

Log:
Remove dead code

Modified:
   trunk/GME/Gme/GMEView.cpp
   trunk/GME/Gme/GUIObject.cpp
   trunk/GME/Gme/GraphicsUtil.cpp
   trunk/GME/Gme/GraphicsUtil.h

Modified: trunk/GME/Gme/GMEView.cpp
==============================================================================
--- trunk/GME/Gme/GMEView.cpp	Mon Apr  5 11:25:47 2021	(r2793)
+++ trunk/GME/Gme/GMEView.cpp	Mon Apr  5 11:25:51 2021	(r2794)
@@ -986,7 +986,7 @@
 				if (connSrcPort) {
 					rect = connSrcPort->GetLocation() + rect.TopLeft();
 				}
-				Gdiplus::Pen* xorPen = graphics.GetGdipPen2(&gdip, GME_DARKRED_COLOR, GME_LINE_SOLID, m_zoomVal > ZOOM_NO, GME_CONNSELECT_WIDTH);
+				Gdiplus::Pen* xorPen = graphics.GetGdipPen2(&gdip, GME_DARKRED_COLOR, GME_LINE_SOLID, GME_CONNSELECT_WIDTH);
 				pDC->DPtoLP(rect);
 				gdip.DrawRectangle(xorPen, rect.left - .5f, rect.top - .5f, (float)rect.Width(), (float)rect.Height());
 
@@ -1021,7 +1021,7 @@
 					rect = connTmpPort->GetLocation() + rect.TopLeft();
 				}
 				pDC->DPtoLP(rect);
-				Gdiplus::Pen* xorPen = graphics.GetGdipPen2(&gdip, GME_RED_COLOR, GME_LINE_SOLID, m_zoomVal > ZOOM_NO, GME_CONNSELECT_WIDTH);
+				Gdiplus::Pen* xorPen = graphics.GetGdipPen2(&gdip, GME_RED_COLOR, GME_LINE_SOLID, GME_CONNSELECT_WIDTH);
 				gdip.DrawRectangle(xorPen, rect.left - .5f, rect.top - .5f, (float) rect.Width(), (float) rect.Height());
 
 				if ((connTmpHotSide != GME_CENTER) && (!connTmpPort)) {
@@ -2754,7 +2754,7 @@
 			DrawTracker(pDC, trackerRect, CRectTracker::dottedLine);
 		}
 	} else if (customizeConnectionType == CustomPointCustomization) {
-		Gdiplus::Pen* dashPen = graphics.GetGdipPen2(gdip, GME_BLACK_COLOR, GME_LINE_DASH, m_zoomVal > ZOOM_NO, 1);
+		Gdiplus::Pen* dashPen = graphics.GetGdipPen2(gdip, GME_BLACK_COLOR, GME_LINE_DASH, 1);
 		ASSERT(customizeConnectionEdgeStartPoint != emptyPoint);
 		if (customizeConnectionEdgeStartPoint != emptyPoint)
 			gdip->DrawLine(dashPen, customizeConnectionEdgeStartPoint.x, customizeConnectionEdgeStartPoint.y,

Modified: trunk/GME/Gme/GUIObject.cpp
==============================================================================
--- trunk/GME/Gme/GUIObject.cpp	Mon Apr  5 11:25:47 2021	(r2793)
+++ trunk/GME/Gme/GUIObject.cpp	Mon Apr  5 11:25:51 2021	(r2794)
@@ -2701,7 +2701,7 @@
 		width = (int)((float)((ZOOM_NO - 25) / max(10, view->m_zoomVal) + 0.2) * width + 0.5f);
 	}
 	graphics.DrawConnection(gdip, points, customizedEdgeIndexes, grayedOut ? GME_GRAYED_OUT_COLOR : color,
-							lineType, srcStyle, dstStyle, view->m_zoomVal > ZOOM_NO, !IsAutoRouted() && selected,
+							lineType, srcStyle, dstStyle, !IsAutoRouted() && selected,
 							width);
 
 	if (points.GetSize() < 2) {

Modified: trunk/GME/Gme/GraphicsUtil.cpp
==============================================================================
--- trunk/GME/Gme/GraphicsUtil.cpp	Mon Apr  5 11:25:47 2021	(r2793)
+++ trunk/GME/Gme/GraphicsUtil.cpp	Mon Apr  5 11:25:51 2021	(r2794)
@@ -272,20 +272,20 @@
 }
 
 Gdiplus::Pen* CGraphics::GetGdipPen2(Gdiplus::Graphics* gdip, COLORREF color, GMEConnLineType lineType,
-									 bool isViewMagnified, int width)
+									 int width)
 {
 	// TODO
 //	HDC hDC = gdip->GetHDC();
 //	bool isPrinting = GetDeviceCaps(hDC, TECHNOLOGY) == DT_RASPRINTER;
 //	gdip->ReleaseHDC(hDC);
-	return GetGdipPen(gdip, color, /*isPrinting*/ false, lineType, isViewMagnified, width);
+	return GetGdipPen(gdip, color, /*isPrinting*/ false, lineType, width);
 }
 
 Gdiplus::Pen* CGraphics::GetGdipPen(Gdiplus::Graphics* gdip, COLORREF color, bool isPrinting, GMEConnLineType lineType,
-									bool isViewMagnified, int width)
+									int width)
 {
 	CString chBuffer;
-	chBuffer.Format(_T("%x-%d-%d-%d-%ld"), color, isPrinting, lineType, isViewMagnified, width);
+	chBuffer.Format(_T("%x-%d-%d-%ld"), color, isPrinting, lineType, width);
 	std::map<CString,Gdiplus::Pen*>::iterator it = m_mapGdipPens.find(chBuffer);
 	if (it != m_mapGdipPens.end())
 		return it->second;
@@ -335,7 +335,7 @@
 typedef std::pair<long,long> Long_Pair;
 
 void CGraphics::DrawConnection(Gdiplus::Graphics* gdip, const CPointList& points, const std::vector<long>& customizedEdgeIndexes,
-							   COLORREF color, GMEConnLineType lineType, int srcEnd, int dstEnd, bool isViewMagnified,
+							   COLORREF color, GMEConnLineType lineType, int srcEnd, int dstEnd,
 							   bool drawBullets, int width)
 {
 	if (points.GetCount() == 0)
@@ -381,9 +381,9 @@
 				Gdiplus::Pen* pen;
 				indIter = customizedIndexes.find(currEdgeIndex);
 				if (indIter != customizedIndexes.end()) {
-					pen = GetGdipPen(gdip, color, isPrinting, GME_LINE_CUSTOMIZED, isViewMagnified, width);
+					pen = GetGdipPen(gdip, color, isPrinting, GME_LINE_CUSTOMIZED, width);
 				} else {
-					pen = GetGdipPen(gdip, color, isPrinting, lineType, isViewMagnified, width);
+					pen = GetGdipPen(gdip, color, isPrinting, lineType, width);
 				}
 				gdip->DrawLine(pen, last.x, last.y, pt.x, pt.y);
 				if (drawBullets && currEdgeIndex < numEdges - 1) {
@@ -404,7 +404,7 @@
 			CPoint pt = points.GetNext(pos);
 			gpoints.push_back(Point(pt.x, pt.y));
 		}
-		Pen* pen = GetGdipPen(gdip, color, isPrinting, lineType, isViewMagnified, width);
+		Pen* pen = GetGdipPen(gdip, color, isPrinting, lineType, width);
 		gdip->DrawLines(pen, &gpoints[0], gpoints.size()); // n.b. this is different than a sequence of DrawLine()s (GME-419)
 	}
 

Modified: trunk/GME/Gme/GraphicsUtil.h
==============================================================================
--- trunk/GME/Gme/GraphicsUtil.h	Mon Apr  5 11:25:47 2021	(r2793)
+++ trunk/GME/Gme/GraphicsUtil.h	Mon Apr  5 11:25:51 2021	(r2794)
@@ -62,9 +62,9 @@
 	void	Uninitialize(void);
 
 	Gdiplus::Pen* GetGdipPen2(Gdiplus::Graphics* gdip, COLORREF color, GMEConnLineType lineType = GME_LINE_SOLID,
-							  bool isViewMagnified = false, int width = 1);
+							  int width = 1);
 	Gdiplus::Pen* GetGdipPen(Gdiplus::Graphics* gdip, COLORREF color, bool isPrinting, GMEConnLineType lineType = GME_LINE_SOLID,
-							 bool isViewMagnified = false, int width = 1);
+							 int width = 1);
 	Gdiplus::SolidBrush* GetGdipBrush(COLORREF color);
 	Gdiplus::Font* GetGdipFont(GMEFontKind kind);
 	Gdiplus::Font* GetGdipFont(int kindsize, bool bold = false, bool semibold = false);
@@ -72,7 +72,7 @@
 	void CreateFonts(CFont** font, Gdiplus::Font** gdipFont, int boldness);
 	void DrawGrid(Gdiplus::Graphics* gdip, int xSpace, int ySpace, int maxx, int maxy, COLORREF color = GME_GRID_COLOR);
 	void DrawConnection(Gdiplus::Graphics* gdip, const CPointList& points, const std::vector<long>& customizedEdgeIndexes,
-						COLORREF color, GMEConnLineType lineType, int srcEnd, int dstEnd, bool isViewMagnified,
+						COLORREF color, GMEConnLineType lineType, int srcEnd, int dstEnd,
 						bool drawBullets, int width = 1);
 	void DrawArrow(Gdiplus::Graphics* gdip, Gdiplus::Pen* pen, Gdiplus::Brush* brush,
 				   const CPoint& beforeLast, const CPoint& last, int iEnd, bool bold);


More information about the gme-commit mailing list