- Timestamp:
- Jan 22, 2009, 4:40:22 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/management/src/G4ViewParameters.cc
r911 r913 25 25 // 26 26 // 27 // $Id: G4ViewParameters.cc,v 1.3 4 2009/01/19 16:26:40lgarnier Exp $27 // $Id: G4ViewParameters.cc,v 1.36 2009/01/21 17:05:12 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 556 556 } 557 557 558 G4int m= ParseGeometry( geomString, &x, &y, &w, &h );558 fGeometryMask = ParseGeometry( geomString, &x, &y, &w, &h ); 559 559 560 560 // Handle special case : 561 if (( m& fYValue) == 0)561 if ((fGeometryMask & fYValue) == 0) 562 562 { // Using default 563 y = fWindowLocationHintY; 564 } 565 if (( m& fXValue) == 0)563 y = fWindowLocationHintY; 564 } 565 if ((fGeometryMask & fXValue) == 0) 566 566 { // Using default 567 x = fWindowLocationHintX; 567 x = fWindowLocationHintX; 568 568 } 569 569 570 570 // Check errors 571 if ( ((m & fHeightValue) == 0 ) || 572 ((m & fWidthValue) == 0 )) { 573 G4cout << "ERROR: Unrecognised geometry string \"" 571 // if there is no Width and Height 572 if ( ((fGeometryMask & fHeightValue) == 0 ) && 573 ((fGeometryMask & fWidthValue) == 0 )) { 574 h = fWindowSizeHintY; 575 w = fWindowSizeHintX; 576 } else if ((fGeometryMask & fHeightValue) == 0 ) { 577 578 // if there is only Width. Special case to be backward compatible 579 // We set Width and Height the same to obtain a square windows. 580 581 G4cout << "Unrecognised geometry string \"" 574 582 << geomString 575 << "\". Using default"583 << "\". No Height found. Using Width value instead" 576 584 << G4endl; 577 } else { 578 // Set the string 579 fXGeometryString = geomString; 580 581 // Set values 582 fWindowSizeHintX = w; 583 fWindowSizeHintY = h; 584 fWindowLocationHintX = x; 585 fWindowLocationHintY = y; 586 if ( (m & fXNegative) ) { 585 h = w; 586 } 587 if ( ((fGeometryMask & fXValue) == 0 ) || 588 ((fGeometryMask & fYValue) == 0 )) { 589 //Using defaults 590 x = fWindowLocationHintX; 591 y = fWindowLocationHintY; 592 } 593 // Set the string 594 fXGeometryString = geomString; 595 596 // Set values 597 fWindowSizeHintX = w; 598 fWindowSizeHintY = h; 599 fWindowLocationHintX = x; 600 fWindowLocationHintY = y; 601 602 if ( ((fGeometryMask & fXValue)) && 603 ((fGeometryMask & fYValue))) { 604 605 if ( (fGeometryMask & fXNegative) ) { 587 606 fWindowLocationHintXNegative = true; 588 607 } else { 589 608 fWindowLocationHintXNegative = false; 590 609 } 591 if ( ( m& fYNegative) ) {592 610 if ( (fGeometryMask & fYNegative) ) { 611 fWindowLocationHintYNegative = true; 593 612 } else { 594 613 fWindowLocationHintYNegative = false; 595 614 } 596 615 } 597 598 616 } 599 617
Note: See TracChangeset
for help on using the changeset viewer.