Re: [Win32lib] setPenColor
- Posted by Wolf <wolfritz at KING.IGS.NET> Jun 17, 2002
- 442 views
Since no one responded to my last blurb about this, I put a printf() behind every call to xSelectObject() in win32lib, then ran the following code in both an onOpen[], then an onPaint[], with conflicting results. In an onOpen[], there were 8 calls to xSelectObject(), as I expected, but in an onPaint[], there were only 5 ( per 'paint' event ). If the 'rule' regarding SelectObject() is to be taken literally, should the results not be the same ??? < An application should always replace a new object with the original, default object after it has finished drawing with the new object. > This is clearly happening in an onOpen[], so why not an onPaint[] ? Perhaps someone could enlighten me ... -- simple code -- setPenColor(w,Red) drawLine(w,10,10,120,120) setPenColor(w,Green) drawLine(w,10,10,40,140) setPenColor(w,Blue) drawLine(w,10,10,140,10) setPenColor(w,Black) drawLine(w,10,10,60,100)