C Board  

Go Back   C Board > Platform Specific Boards > Windows Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 07-23-2008, 11:47 PM   #1
Registered User
 
Join Date: Jul 2004
Posts: 222
clipping path

I'm trying to draw a structure in Windows GDI within a certain clip path to verify the functionalities of my printer driver. However, I would like to confirm about whether my client application test code would be functional since I have been encounterring some problems with the clip path that I would like to isolate between the client application and the driver.

This is my clip region drawing function.
Code:
void RectDraw(HDC *hdc)
{
	BOOL success;
	int nX = 150; 
	int nY = 150; 
	DWORD dwRadius = 100; 
	float xStartAngle = 60; 
	float xSweepAngle = 60;
	HGDIOBJ hNewObj;
	HBRUSH hBrush;

	POINT points[] = {
		{1700, 1700},
		{2000, 2000},
		{2562, 1503}
	};

	// set up the brush
	hBrush = CreateSolidBrush(RGB(44, 25, 64));

	// Begin Path
	success = BeginPath(*hdc);

	// Create a Path
	success = Rectangle(*hdc, 150, 150, 200, 200);

	success = EndPath(*hdc); 
	success = SelectClipPath(*hdc, RGN_AND);
}
The clip region drawing function is called before the pie path filling function, like as shown below:
Code:
RectDraw(&hDC);
PieDraw(&hDC);                                 // has shown to work
The clipping path function is implemented roughly according to the documentation on Windows GDI in MSDN. Any comments would be muchly appreciated.
stanlvw is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shortest Path Maze Solver (Breadth Search Help) Raskalnikov C Programming 5 04-07-2009 07:41 PM
Can't figure out what keeps hanging up my program shays C Programming 7 11-12-2007 02:59 PM
Shortest path problem Digitalxero C++ Programming 0 10-25-2005 05:32 PM
linked list recursive function spaghetti ... C++ Programming 4 09-02-2003 02:53 PM
Problem building Quake source Silvercord Game Programming 14 01-25-2003 10:01 PM


All times are GMT -6. The time now is 05:22 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22