On Wed, 10 Mar 2021 09:31:32 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

>> Alexander Scherbatiy has updated the pull request incrementally with two 
>> additional commits since the last revision:
>> 
>>  - Use DASSERT to check SetGraphicsMode and WorldTransform results
>>  - Change setGraphicsMode() type to void
>
> src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java line 1025:
> 
>> 1023:      * {@code GM_COMPATIBLE} or {@code GM_ADVANCED}.
>> 1024:      */
>> 1025:     private int setGraphicsMode(int mode) {
> 
> Is there any need of "int" return value? I dont see it is used in 
> restoreTransform()

I updated the code to return void from setGraphicsMode() method.

> src/java.desktop/windows/native/libawt/windows/awt_PrintJob.cpp line 2033:
> 
>> 2031:     xForm.eDy  = (FLOAT) elems[5];
>> 2032: 
>> 2033:     ::SetWorldTransform((HDC)printDC, &xForm);
> 
> Probably we should check for the return value of all this system APIs 
> SetGraphicsMode, GetWorldTransform, SetWorldTransform, ModifyWorldTransform 
> to see if it succeeded?

I added DASSERT to check SetGraphicsMode and Get/Set/ModifyWorldTransform 
results.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2756

Reply via email to