Salome HOME
projects
/
modules
/
gui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to paraview 5.4
[modules/gui.git]
/
src
/
GLViewer
/
GLViewer_BaseObjects.cxx
diff --git
a/src/GLViewer/GLViewer_BaseObjects.cxx
b/src/GLViewer/GLViewer_BaseObjects.cxx
index 3773bb8734959d56c9581042f5c1e6f1563bfd55..cf12ae7ba5d29b1c5520cba1e17c03af4f09be15 100644
(file)
--- a/
src/GLViewer/GLViewer_BaseObjects.cxx
+++ b/
src/GLViewer/GLViewer_BaseObjects.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
6
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-212,7
+212,7
@@
bool GLViewer_MarkerSet::translateToPS( QFile& hFile, GLViewer_CoordSystem* aVie
}
aBuffer+="closepath\nstroke\n";
}
aBuffer+="closepath\nstroke\n";
- hFile.write( aBuffer.to
Ascii
() );
+ hFile.write( aBuffer.to
Latin1
() );
return true;
}
return true;
}
@@
-250,7
+250,7
@@
bool GLViewer_MarkerSet::translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aV
}
aBuffer+="PU;\n";
}
aBuffer+="PU;\n";
- hFile.write( aBuffer.to
Ascii
() );
+ hFile.write( aBuffer.to
Latin1
() );
}
return true;
}
return true;
@@
-370,12
+370,12
@@
GLboolean GLViewer_MarkerSet::highlight( GLfloat x, GLfloat y, GLfloat tol, GLbo
if ( ( isCircle && ( xdist * xdist + ydist * ydist <= myMarkerSize * myMarkerSize ) ) ||
( !isCircle && ( fabs( xdist ) <= radius && fabs( ydist ) <= radius ) ) )
{
if ( ( isCircle && ( xdist * xdist + ydist * ydist <= myMarkerSize * myMarkerSize ) ) ||
( !isCircle && ( fabs( xdist ) <= radius && fabs( ydist ) <= radius ) ) )
{
- isFound =
FALSE
;
+ isFound =
false
;
count++;
for ( it = myCurSelNumbers.begin(); it != myCurSelNumbers.end(); ++it )
if( i == *it )
{
count++;
for ( it = myCurSelNumbers.begin(); it != myCurSelNumbers.end(); ++it )
if( i == *it )
{
- isFound =
TRUE
;
+ isFound =
true
;
curHNumbers.append( i );
}
curHNumbers.append( i );
}
@@
-462,13
+462,13
@@
GLboolean GLViewer_MarkerSet::select( GLfloat x, GLfloat y, GLfloat tol, GLViewe
count++;
if ( isShift )
{
count++;
if ( isShift )
{
- bool isFound =
FALSE
;
+ bool isFound =
false
;
for( it = mySelNumbers.begin(); it != mySelNumbers.end(); ++it )
if ( *it == i )
{
myUSelNumbers.append( *it );
remIt = it;
for( it = mySelNumbers.begin(); it != mySelNumbers.end(); ++it )
if ( *it == i )
{
myUSelNumbers.append( *it );
remIt = it;
- isFound =
TRUE
;
+ isFound =
true
;
break;
}
break;
}
@@
-651,7
+651,7
@@
void GLViewer_MarkerSet::exportNumbers( QList<int>& highlight,
bool GLViewer_MarkerSet::addOrRemoveSelected( int index )
{
if( index < 0 || index > myNumber )
bool GLViewer_MarkerSet::addOrRemoveSelected( int index )
{
if( index < 0 || index > myNumber )
- return
FALSE
;
+ return
false
;
int n = mySelNumbers.indexOf( index );
if( n == -1 )
int n = mySelNumbers.indexOf( index );
if( n == -1 )
@@
-661,7
+661,7
@@
bool GLViewer_MarkerSet::addOrRemoveSelected( int index )
mySelNumbers.removeAt(n);
myUSelNumbers.append( index );
}
mySelNumbers.removeAt(n);
myUSelNumbers.append( index );
}
- return
TRUE
;
+ return
true
;
}
/*!
}
/*!
@@
-869,7
+869,7
@@
bool GLViewer_Polyline::translateToPS( QFile& hFile, GLViewer_CoordSystem* aView
aBuffer+="closepath\nstroke\n";
aBuffer+="closepath\nstroke\n";
- hFile.write( aBuffer.to
Ascii
() );
+ hFile.write( aBuffer.to
Latin1
() );
return true;
}
return true;
}
@@
-895,7
+895,7
@@
bool GLViewer_Polyline::translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aVi
aBuffer+="PU;\n";
aBuffer+="PU;\n";
- hFile.write( aBuffer.to
Ascii
() );
+ hFile.write( aBuffer.to
Latin1
() );
return true;
}
return true;
}
@@
-1096,7
+1096,7
@@
GLboolean GLViewer_Polyline::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer
GLfloat xa, xb, ya, yb, l;
GLfloat rsin, rcos, r, ra, rb;
// GLboolean update;
GLfloat xa, xb, ya, yb, l;
GLfloat rsin, rcos, r, ra, rb;
// GLboolean update;
- GLboolean selected = myIsSel;
+
//
GLboolean selected = myIsSel;
myIsSel = GL_FALSE;
myIsSel = GL_FALSE;
@@
-1394,7
+1394,7
@@
bool GLViewer_TextObject::translateToPS( QFile& hFile, GLViewer_CoordSystem* aVi
AddCoordsToPS( aBuffer, "moveto", aViewerCS, aPSCS, double(xPos), double(yPos) );
aBuffer += "(" + aText + ") show\n";
AddCoordsToPS( aBuffer, "moveto", aViewerCS, aPSCS, double(xPos), double(yPos) );
aBuffer += "(" + aText + ") show\n";
- hFile.write( aBuffer.to
Ascii
() );
+ hFile.write( aBuffer.to
Latin1
() );
return true;
}
return true;
}
@@
-1416,7
+1416,7
@@
bool GLViewer_TextObject::translateToHPGL( QFile& hFile, GLViewer_CoordSystem* a
aBuffer = "LB" + aText + "#;";
aBuffer = "LB" + aText + "#;";
- hFile.write( aBuffer.to
Ascii
() );
+ hFile.write( aBuffer.to
Latin1
() );
return true;
}
return true;
}
@@
-1438,16
+1438,15
@@
bool GLViewer_TextObject::translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerC
y = double( yPos );
aViewerCS->transform( *aEMFCS, x, y );
y = double( yPos );
aViewerCS->transform( *aEMFCS, x, y );
- const char* str = aText.toAscii();
int nHeight = 35*14; // height of font
int nWidth = 35*12; // average character width
int nEscapement = 0; // angle of escapement
int nOrientation = 0; // base-line orientation angle
int fnWeight = FW_NORMAL; // font weight
int nHeight = 35*14; // height of font
int nWidth = 35*12; // average character width
int nEscapement = 0; // angle of escapement
int nOrientation = 0; // base-line orientation angle
int fnWeight = FW_NORMAL; // font weight
- DWORD fdwItalic =
FALSE
; // italic attribute option
- DWORD fdwUnderline =
FALSE
; // underline attribute option
- DWORD fdwStrikeOut =
FALSE
; // strikeout attribute option
+ DWORD fdwItalic =
false
; // italic attribute option
+ DWORD fdwUnderline =
false
; // underline attribute option
+ DWORD fdwStrikeOut =
false
; // strikeout attribute option
DWORD fdwCharSet = ANSI_CHARSET; // character set identifier
DWORD fdwOutputPrecision = OUT_DEFAULT_PRECIS; // output precision
DWORD fdwClipPrecision = CLIP_DEFAULT_PRECIS; // clipping precision
DWORD fdwCharSet = ANSI_CHARSET; // character set identifier
DWORD fdwOutputPrecision = OUT_DEFAULT_PRECIS; // output precision
DWORD fdwClipPrecision = CLIP_DEFAULT_PRECIS; // clipping precision
@@
-1467,7
+1466,7
@@
bool GLViewer_TextObject::translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerC
HGDIOBJ old1 = SelectObject( dc, aFont );
HGDIOBJ old2 = SelectObject( dc, aBrush );
HGDIOBJ old1 = SelectObject( dc, aFont );
HGDIOBJ old2 = SelectObject( dc, aBrush );
- TextOut( dc, x, y,
str
, aText.length() );
+ TextOut( dc, x, y,
aText.toLatin1().constData()
, aText.length() );
SelectObject ( dc, old1 );
SelectObject ( dc, old2 );
SelectObject ( dc, old1 );
SelectObject ( dc, old2 );
@@
-1573,9
+1572,9
@@
GLboolean GLViewer_TextObject::highlight( GLfloat theX, GLfloat theY, GLfloat th
QRegion circle( (int)(theX - theTol), (int)(theY - theTol),
(int)(2 * theTol), (int)(2 * theTol), QRegion::Ellipse );
if( isCircle )
QRegion circle( (int)(theX - theTol), (int)(theY - theTol),
(int)(2 * theTol), (int)(2 * theTol), QRegion::Ellipse );
if( isCircle )
- intersection = obj.intersect( circle );
+ intersection = obj.intersect
ed
( circle );
else
else
- intersection = obj.intersect( region );
+ intersection = obj.intersect
ed
( region );
if( intersection.isEmpty() )
myIsHigh = false;
if( intersection.isEmpty() )
myIsHigh = false;
@@
-1631,9
+1630,9
@@
GLboolean GLViewer_TextObject::select( GLfloat theX, GLfloat theY, GLfloat theTo
QRegion circle( (int)(theX - theTol), (int)(theY - theTol),
(int)(2 * theTol), (int)(2 * theTol), QRegion::Ellipse );
if( isCircle )
QRegion circle( (int)(theX - theTol), (int)(theY - theTol),
(int)(2 * theTol), (int)(2 * theTol), QRegion::Ellipse );
if( isCircle )
- intersection = obj.intersect( circle );
+ intersection = obj.intersect
ed
( circle );
else
else
- intersection = obj.intersect( region );
+ intersection = obj.intersect
ed
( region );
if( intersection.isEmpty() )
myIsSel = false;
if( intersection.isEmpty() )
myIsSel = false;