View Issue Details

IDProjectCategoryView StatusLast Update
0029350Open CASCADEOCCT:Visualizationpublic2018-06-29 21:19
Reporterkgv Assigned Tokgv  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Target Version7.3.0Fixed in Version7.3.0 
Summary0029350: Visualization, OpenGl_Text - add Aspect_TODT_SHADOW text style
DescriptionAspect_TODT_DEKALE style makes text readable on arbitrary background by drawing contour of different color.

However, due to current limitations, the visual result is not very good and performance is also suboptimal - the text is drawn 5 times to achieve effect (4 times with pixel shift in each direction).

The visual representation of Aspect_TODT_DEKALE style can be improved by using more advanced approach, but for now another style Aspect_TODT_SHADOW is proposed to be added.

Within new style, a shadow will be drawn with 1 pixel shift in bottom-right direction (thus 2 times to draw whole text), which is less expensive than Aspect_TODT_DEKALE and looks more natural.
Steps To Reproduce
pload MODELING VISUALIZATION
box b 1 2 3
vclear
vinit View1
vdisplay -dispMode 1 b
vfit
vdrawtext ts "Shadow Text" -height 16 -font SansFont -2d -persPos -1 1 -subColor BLUE1 -pos 20 -150 0 -color WHITE -dispType shadow
vdrawtext td "Decal Text" -height 16 -font SansFont -2d -persPos -1 1 -subColor BLUE1 -pos 20 -200 0 -color WHITE -dispType decal
TagsNo tags attached.
Test case numberNot required

Attached Files

  • occ_text_styles.png (32,677 bytes)

Activities

kgv

2017-11-28 11:27

developer  

occ_text_styles.png (32,677 bytes)

git

2017-11-28 11:34

administrator   ~0072524

Branch CR29350 has been created by kgv.

SHA-1: c03a4d5dcf50aeffcf017ee090d427dfc021d7cf


Detailed log of new commits:

Author: kgv
Date: Tue Nov 28 09:46:42 2017 +0300

    0029350: Visualization, OpenGl_Text - add Aspect_TODT_SHADOW text style
    
    Within new style Aspect_TODT_SHADOW, a tiny shadow is drawn at right-bottom corner
    with one pixel shift, producing a slightly nicer visual look than Aspect_TODT_DEKALE.

kgv

2017-11-28 11:35

developer   ~0072525

Last edited: 2017-11-28 14:23

Patch is ready for review.

http://jenkins-test-10.nnov.opencascade.com/view/CR29350-master-KGV/

san

2017-11-29 19:37

developer   ~0072598

Branch CR29350 reviewed without remarks, ready for testing.

bugmaster

2017-11-30 11:09

administrator   ~0072611

Combination -
OCCT branch : CR29350 SHA - c03a4d5dcf50aeffcf017ee090d427dfc021d7cf
Products branch : master SHA - e6803066bfddb413c99c934cc8af4386abcbc679
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian70-64:
OCCT
Total CPU difference: 20115.87000000052 / 19837.270000000357 [+1.40%]
Products
Total CPU difference: 8037.610000000071 / 8039.350000000084 [-0.02%]
Windows-64-VC10:
OCCT
Total CPU difference: 17883.783038898575 / 17832.614710898575 [+0.29%]
Products
Total CPU difference: 8002.040094799986 / 8019.621407499985 [-0.22%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2017-12-07 21:08

administrator   ~0072831

Branch CR29350 has been deleted by kgv.

SHA-1: c03a4d5dcf50aeffcf017ee090d427dfc021d7cf

Related Changesets

occt: master 3cbd0a8e

2017-11-28 06:46:42

kgv

Details Diff
0029350: Visualization, OpenGl_Text - add Aspect_TODT_SHADOW text style

Within new style Aspect_TODT_SHADOW, a tiny shadow is drawn at right-bottom corner
with one pixel shift, producing a slightly nicer visual look than Aspect_TODT_DEKALE.
Affected Issues
0029350
mod - src/Aspect/Aspect_TypeOfDisplayText.hxx Diff File
mod - src/OpenGl/OpenGl_Text.cxx Diff File
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff File
mod - tests/3rdparty/fonts/A7 Diff File

Issue History

Date Modified Username Field Change
2017-11-28 09:43 kgv New Issue
2017-11-28 09:43 kgv Assigned To => kgv
2017-11-28 11:27 kgv File Added: occ_text_styles.png
2017-11-28 11:32 kgv Steps to Reproduce Updated
2017-11-28 11:34 git Note Added: 0072524
2017-11-28 11:35 kgv Note Added: 0072525
2017-11-28 11:35 kgv Assigned To kgv => san
2017-11-28 11:35 kgv Status new => resolved
2017-11-28 14:23 kgv Note Edited: 0072525
2017-11-29 19:37 san Note Added: 0072598
2017-11-29 19:37 san Assigned To san => bugmaster
2017-11-29 19:37 san Status resolved => reviewed
2017-11-30 11:02 bugmaster Test case number => Not required
2017-11-30 11:09 bugmaster Note Added: 0072611
2017-11-30 11:09 bugmaster Status reviewed => tested
2017-12-02 16:59 kgv Changeset attached => occt master 3cbd0a8e
2017-12-02 16:59 kgv Assigned To bugmaster => kgv
2017-12-02 16:59 kgv Status tested => verified
2017-12-02 16:59 kgv Resolution open => fixed
2017-12-07 21:08 git Note Added: 0072831
2018-02-20 12:58 aiv Target Version 7.4.0 => 7.3.0
2018-06-29 21:15 aiv Fixed in Version => 7.3.0
2018-06-29 21:19 aiv Status verified => closed