Archived issue #0023015
TKOpenGl redesign regression in text printing
Description
There is regression caused by #0022819.
Current implementation aimed to print 3D view visually similar to displayed on the screen but with quality adopted to printer resolution.
Because zoom-less text rendered pixel-exact regardless 3D view zoom and window dimensions additional scale factor should be applied to reach similar results for rendering buffer.
Previously this was implemented as OpenGl_PrinterContext::GetScale() property.
However this functionality was lost and text doesn't scaled.
There is also another problem: when printing view by tile algorithm with some geometry object and text, the object loses its material colors, like becoming colored in white. This is seen on attached images ("Attachment 3 (JPG)").
Current implementation aimed to print 3D view visually similar to displayed on the screen but with quality adopted to printer resolution.
Because zoom-less text rendered pixel-exact regardless 3D view zoom and window dimensions additional scale factor should be applied to reach similar results for rendering buffer.
Previously this was implemented as OpenGl_PrinterContext::GetScale() property.
However this functionality was lost and text doesn't scaled.
There is also another problem: when printing view by tile algorithm with some geometry object and text, the object loses its material colors, like becoming colored in white. This is seen on attached images ("Attachment 3 (JPG)").
Steps to reproduce
=====================================================================
The scenario to check the text size:
- Render zoom-less text on front on some 3D objects
- Print 3D view with 72 dpi quality (appropriate printer required)
- Print 3D view with 300 dpi quality (appropriate printer required)
- Dump 3D View as image with window dimensions
- Compare results
Expected results:
all images should have the same text / 3D scene proportions.
Actual results:
text scaled not proportionally
===============================================================
The simple DRAW scenario to check the text and color bugs:
pload ALL
vinit
vdrawtext "Text1" 20 0 0 200 200 0 0 0 0 0 40 0
box b 10 10 10
vdisplay b
vsetdispmode b 1
vfit
vprintview 12000 12000 C:\\print.jpg 1
# Now check the image. #
The scenario to check the text size:
- Render zoom-less text on front on some 3D objects
- Print 3D view with 72 dpi quality (appropriate printer required)
- Print 3D view with 300 dpi quality (appropriate printer required)
- Dump 3D View as image with window dimensions
- Compare results
Expected results:
all images should have the same text / 3D scene proportions.
Actual results:
text scaled not proportionally
===============================================================
The simple DRAW scenario to check the text and color bugs:
pload ALL
vinit
vdrawtext "Text1" 20 0 0 200 200 0 0 0 0 0 40 0
box b 10 10 10
vdisplay b
vsetdispmode b 1
vfit
vprintview 12000 12000 C:\\print.jpg 1
# Now check the image. #
Public activity
6 archived notes
Participants are labeled by their role within this record.
The fix provided in Git branch CR23015;
The suitable test case can be also created from prototype draw command. It seems like we don't have any test case to check the text priniting.
- To detect the first problem (text size) the view with non-zoomable text displayed should be printed (this could be done by vprintview command);
- To detect the second described problem (colors) it is necessary to print the text with some geometry by tiling algorithm (like in prototype script). It is necessary to use large image dimensions (more that FBO size, for ex. 12000x12000 image on my workstation).
It is possible to check text & colors together by printing non-zoomable text and geometry at once by tile printing algorithm.
The suitable test case can be also created from prototype draw command. It seems like we don't have any test case to check the text priniting.
- To detect the first problem (text size) the view with non-zoomable text displayed should be printed (this could be done by vprintview command);
- To detect the second described problem (colors) it is necessary to print the text with some geometry by tiling algorithm (like in prototype script). It is necessary to use large image dimensions (more that FBO size, for ex. 12000x12000 image on my workstation).
It is possible to check text & colors together by printing non-zoomable text and geometry at once by tile printing algorithm.
Dear Kgv,
Could you please review the git branch CR23015?
Could you please review the git branch CR23015?
Patch is OK, please test it.
Dear Commenter 1,
The following debug messages in console after "vprintview" command:
"OpenGl_FrameBuffer::Release() called with invalid OpenGl_Context!"
are fixed in patch to #0023001 bug
The following debug messages in console after "vprintview" command:
"OpenGl_FrameBuffer::Release() called with invalid OpenGl_Context!"
are fixed in patch to #0023001 bug
Dear Commenter 1,
Workbench KAS:dev:mkv-23015-occt was created from git branch CR23015
(and mkv-23015-products from svn trunk) and compiled on Linux platform.
There are not regressions in mkv-23015-products regarding to KAS:dev:products-20120306-opt
Test case for this bug is chl/934/W4. It is OK.
N.B. There are following messages during execution this thest case:
OpenGl_FrameBuffer::Release() called with invalid OpenGl_Context!
OpenGl_FrameBuffer::Release() called with invalid OpenGl_Context!
See results in /QADisk/occttests/results/KAS/dev/mkv-23015-products_16032012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120306-opt_07032012/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification
Workbench KAS:dev:mkv-23015-occt was created from git branch CR23015
(and mkv-23015-products from svn trunk) and compiled on Linux platform.
There are not regressions in mkv-23015-products regarding to KAS:dev:products-20120306-opt
Test case for this bug is chl/934/W4. It is OK.
N.B. There are following messages during execution this thest case:
OpenGl_FrameBuffer::Release() called with invalid OpenGl_Context!
OpenGl_FrameBuffer::Release() called with invalid OpenGl_Context!
See results in /QADisk/occttests/results/KAS/dev/mkv-23015-products_16032012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120306-opt_07032012/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification
Integrated into master
Related records