[GME-commit] GMESRC/GME/Gme GraphicsUtil.h,1.5,1.6 GraphicsUtil.cpp,1.12,1.13

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Tue May 11 15:47:57 CDT 2004


Update of /var/lib/gme/GMESRC/GME/Gme
In directory braindrain:/tmp/cvs-serv13506

Modified Files:
	GraphicsUtil.h GraphicsUtil.cpp 
Log Message:
pen width is managed in logical units for printing

CVS User: bogyom

Index: GraphicsUtil.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GraphicsUtil.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** GraphicsUtil.h	3 Feb 2004 23:48:47 -0000	1.5
--- GraphicsUtil.h	11 May 2004 19:47:49 -0000	1.6
***************
*** 23,26 ****
--- 23,27 ----
  	CPenTable dashPens;
  	CPenTable dashPrintPens;
+ 	CPenTable printPens;
  	CBrushTable brushes;
  	CFont *normalFonts[GME_FONT_KIND_NUM];

Index: GraphicsUtil.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GraphicsUtil.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** GraphicsUtil.cpp	1 Mar 2004 20:14:11 -0000	1.12
--- GraphicsUtil.cpp	11 May 2004 19:47:50 -0000	1.13
***************
*** 107,110 ****
--- 107,122 ----
  	GetPen(GME_GREY_COLOR		,true,true);
  
+ 	GetPen(GME_BACKGROUND_COLOR	,true,false);
+ 	GetPen(GME_BORDER_COLOR		,true,false);
+ 	GetPen(GME_MODEL_COLOR		,true,false);
+ 	GetPen(GME_NAME_COLOR		,true,false);
+ 	GetPen(GME_PORTNAME_COLOR	,true,false);
+ 	GetPen(GME_CONNECTION_COLOR	,true,false);
+ 	GetPen(GME_GRAYED_OUT_COLOR	,true,false);
+ 	GetPen(GME_GRID_COLOR		,true,false);
+ 	GetPen(GME_BLACK_COLOR		,true,false);
+ 	GetPen(GME_WHITE_COLOR		,true,false);
+ 	GetPen(GME_GREY_COLOR		,true,false);
+ 
  	CreateFonts(normalFonts,FW_LIGHT);
  	CreateFonts(semiboldFonts,FW_NORMAL);
***************
*** 123,126 ****
--- 135,139 ----
  	DeletePens(pens);
  	DeletePens(dashPens);
+ 	DeletePens(printPens);
  	DeletePens(dashPrintPens);
  	DeleteBrushes(brushes);
***************
*** 186,200 ****
  {
  	LOGBRUSH logb = {BS_SOLID, 0, 0};
! 	DWORD ustyle[2] = {4, 2};
  	// print real dashed line
  	CPen *pen = 0;
! 	if(!((dash ? (isPrinting? dashPrintPens: dashPens) : pens).Lookup((void *)color,pen))) {
  		pen = new CPen();
  //		pen->CreatePen((dash ? PS_DOT : PS_SOLID),1,color);
  //		pen->CreatePen((dash ? (isPrinting? PS_DASH: PS_DOT) : PS_SOLID),1,color);
  		logb.lbColor = color; 
! 		pen->CreatePen((dash ? (isPrinting? PS_USERSTYLE: PS_DOT) : PS_SOLID),1,
! 			&logb, (dash && isPrinting)? 2: 0, (dash && isPrinting)? ustyle: NULL);
! 		(dash ? (isPrinting? dashPrintPens: dashPens) : pens).SetAt((void *)color,pen);
  	}
  	ASSERT(pen);
--- 199,218 ----
  {
  	LOGBRUSH logb = {BS_SOLID, 0, 0};
! 	DWORD dashstyle[2] = {4, 2};
! 	DWORD solidstyle[2] = {4, 0};
  	// print real dashed line
  	CPen *pen = 0;
! 	if(!((dash ? (isPrinting? dashPrintPens: dashPens) : (isPrinting? printPens: pens)).Lookup((void *)color,pen))) {
  		pen = new CPen();
  //		pen->CreatePen((dash ? PS_DOT : PS_SOLID),1,color);
  //		pen->CreatePen((dash ? (isPrinting? PS_DASH: PS_DOT) : PS_SOLID),1,color);
  		logb.lbColor = color; 
! //		pen->CreatePen((dash ? (isPrinting? PS_USERSTYLE|PS_GEOMETRIC: PS_DOT|PS_GEOMETRIC) : 
! //			PS_SOLID|PS_GEOMETRIC), (isPrinting? 5: 1),
! //			&logb, (dash && isPrinting)? 2: 0, (dash && isPrinting)? dashstyle: NULL);
! 		pen->CreatePen((dash ? (isPrinting? PS_USERSTYLE|PS_GEOMETRIC: PS_DOT) : 
! 			(isPrinting? PS_USERSTYLE|PS_GEOMETRIC: PS_SOLID)), (isPrinting? 1: 1),
! 				&logb, (isPrinting)? 2: 0, (isPrinting)? (dash? dashstyle: solidstyle): NULL);
! 		(dash ? (isPrinting? dashPrintPens: dashPens) : (isPrinting? printPens: pens)).SetAt((void *)color,pen);
  	}
  	ASSERT(pen);



More information about the GME-commit mailing list