View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0020842 | Open CASCADE | OCCT:Visualization | public | 2009-01-29 14:20 | 2015-09-07 11:52 |
Reporter | Assigned To | bugmaster | |||
Priority | low | Severity | trivial | ||
Status | closed | Resolution | won't fix | ||
OS | All | ||||
Fixed in Version | 7.0.0 | ||||
Summary | 0020842: Visualization, 2D layer - strange logic of defining viewport geometry | ||||
Description | Reported by R.Lygin on 20.01.2009 In Visual3d_Layer, when defining a non-square viewport with width != height, object coordinates are mapped incorrectly to the screen ones, unless a "synthetic" square viewport is specified: aDim = Max(aWidth, aHeight); aLayer->SetViewPort(aDim, aDim); This is due to strange code in call_togl_redraw_layer2d () function in OpenGl package: if (alayer->sizeDependent == 0) ratio = (float) dispWidth/dispHeight; else ratio = aview->DefWindow.dx/aview->DefWindow.dy; if (ratio >= 1.0) { /* fenetre horizontale */ delta = (float )((top - bottom)/2.0); switch (attach) { case 0: /* Aspect_TOC_BOTTOM_LEFT */ top = bottom + 2*delta/ratio; Expected behavior is that after myOverLayer->SetViewPort (aWidth, aHegth); myOverLayer->SetOrtho (0, aWidth, aHegth, 0, Aspect_TOC_TOP_LEFT); object coordinates will be mapped "as is" to the screen (pixel) ones. After correction of this problem, it is necessary to revise also V3d_LayerMgr::Begin() method that currently always sets a square viewport. | ||||
Tags | No tags attached. | ||||
Test case number | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2011-08-02 11:24 | bugmaster | Category | OCCT:VIZ => OCCT:Visualization |
2014-02-05 15:18 | kgv | Priority | normal => low |
2014-02-05 15:18 | kgv | Fixed in Version | EMPTY => |
2014-02-05 15:18 | kgv | Summary | 2D layer: Strange logic of defining viewport geometry => Visualization, 2D layer - strange logic of defining viewport geometry |
2014-02-05 15:18 | kgv | Description Updated | |
2015-06-29 12:19 | kgv | Relationship added | related to 0025789 |
2015-08-25 09:42 | kgv | Resolution | open => won't fix |
2015-08-25 09:42 | kgv | Target Version | => 7.0.0 |
2015-09-04 13:10 | kgv | Note Added: 0045056 | |
2015-09-04 13:10 | kgv | Status | new => feedback |
2015-09-04 13:10 | kgv | Fixed in Version | => 7.0.0 |
2015-09-04 13:10 | kgv | Target Version | 7.0.0 => |
2015-09-04 13:12 | kgv | Note Edited: 0045056 | |
2015-09-07 11:52 | bugmaster | Status | feedback => closed |