Removed 'const' from Aspect_Window::DoResize() virtual method.
* Method *Image_PixMap::PixelColor()* has been extended with a new Boolean flag for performing linearization of non-linear sRGB.
This flag is FALSE by default; application should consider passing TRUE instead for further handling *Quantity_Color* properly as linear RGB values.
+@subsection upgrade_750_aspectwindow Aspect_Window interface change
+
+Unexpected const-ness of Aspect_Window::DoResize() method has been removed, so that application classes implementing this interface should be updated accordingly.
+
@subsection upgrade_750_rename Renaming of types
Enumeration BRepOffset_Type is renamed to ChFiDS_TypeOfConcavity.
// Function : DoResize
// Purpose :
// ================================================================
-Aspect_TypeOfResize GlfwOcctWindow::DoResize() const
+Aspect_TypeOfResize GlfwOcctWindow::DoResize()
{
if (glfwGetWindowAttrib (myGlfwWindow, GLFW_VISIBLE) == 1)
{
int anXPos = 0, anYPos = 0, aWidth = 0, aHeight = 0;
glfwGetWindowPos (myGlfwWindow, &anXPos, &anYPos);
glfwGetWindowSize(myGlfwWindow, &aWidth, &aHeight);
- *const_cast<Standard_Integer*>(&myXLeft ) = anXPos;
- *const_cast<Standard_Integer*>(&myXRight ) = anXPos + aWidth;
- *const_cast<Standard_Integer*>(&myYTop ) = anYPos;
- *const_cast<Standard_Integer*>(&myYBottom) = anYPos + aHeight;
+ myXLeft = anXPos;
+ myXRight = anXPos + aWidth;
+ myYTop = anYPos;
+ myYBottom = anYPos + aHeight;
}
return Aspect_TOR_UNKNOWN;
}
virtual Aspect_Drawable NativeParentHandle() const Standard_OVERRIDE { return 0; }
//! Applies the resizing to the window <me>
- virtual Aspect_TypeOfResize DoResize() const Standard_OVERRIDE;
+ virtual Aspect_TypeOfResize DoResize() Standard_OVERRIDE;
//! Returns True if the window <me> is opened and False if the window is closed.
virtual Standard_Boolean IsMapped() const Standard_OVERRIDE;
virtual void Unmap() const Standard_OVERRIDE {}
//! Applies the resizing to the window <me>
- virtual Aspect_TypeOfResize DoResize() const Standard_OVERRIDE { return Aspect_TOR_UNKNOWN; }
+ virtual Aspect_TypeOfResize DoResize() Standard_OVERRIDE { return Aspect_TOR_UNKNOWN; }
//! Apply the mapping change to the window <me>
virtual Standard_Boolean DoMapping() const Standard_OVERRIDE { return Standard_True; }
virtual void Unmap() const {}
//! Applies the resizing to the window <me>
- virtual Aspect_TypeOfResize DoResize() const { return Aspect_TOR_UNKNOWN; }
+ virtual Aspect_TypeOfResize DoResize() { return Aspect_TOR_UNKNOWN; }
//! Apply the mapping change to the window <me>
virtual Standard_Boolean DoMapping() const { return Standard_True; }
// function : DoResize
// purpose :
// =======================================================================
-Aspect_TypeOfResize OcctWindow::DoResize() const
+Aspect_TypeOfResize OcctWindow::DoResize()
{
int aMask = 0;
Aspect_TypeOfResize aMode = Aspect_TOR_UNKNOWN;
break;
} // end switch
- *( ( Standard_Integer* )&myXLeft ) = myWidget->rect().left();
- *( ( Standard_Integer* )&myXRight ) = myWidget->rect().right();
- *( ( Standard_Integer* )&myYTop ) = myWidget->rect().top();
- *( ( Standard_Integer* )&myYBottom) = myWidget->rect().bottom();
+ myXLeft = myWidget->rect().left();
+ myXRight = myWidget->rect().right();
+ myYTop = myWidget->rect().top();
+ myYBottom = myWidget->rect().bottom();
}
return aMode;
virtual Aspect_Drawable NativeParentHandle() const;
//! Applies the resizing to the window <me>
- virtual Aspect_TypeOfResize DoResize() const;
+ virtual Aspect_TypeOfResize DoResize();
//! Returns True if the window <me> is opened
//! and False if the window is closed.
virtual void Unmap() const Standard_OVERRIDE { myIsMapped = Standard_False; }
//! Resize window - do nothing.
- virtual Aspect_TypeOfResize DoResize() const Standard_OVERRIDE { return Aspect_TOR_UNKNOWN; }
+ virtual Aspect_TypeOfResize DoResize() Standard_OVERRIDE { return Aspect_TOR_UNKNOWN; }
//! Map window - do nothing.
virtual Standard_Boolean DoMapping() const Standard_OVERRIDE { return Standard_True; }
Standard_EXPORT virtual void Unmap() const = 0;
//! Apply the resizing to the window <me>.
- Standard_EXPORT virtual Aspect_TypeOfResize DoResize() const = 0;
+ Standard_EXPORT virtual Aspect_TypeOfResize DoResize() = 0;
//! Apply the mapping change to the window <me>.
//! and returns TRUE if the window is mapped at screen.
Standard_EXPORT virtual void Unmap() const Standard_OVERRIDE;
//! Applies the resizing to the window <me>
- Standard_EXPORT virtual Aspect_TypeOfResize DoResize() const Standard_OVERRIDE;
+ Standard_EXPORT virtual Aspect_TypeOfResize DoResize() Standard_OVERRIDE;
//! Apply the mapping change to the window <me>
Standard_EXPORT virtual Standard_Boolean DoMapping() const Standard_OVERRIDE;
// function : DoResize
// purpose :
// =======================================================================
-Aspect_TypeOfResize Cocoa_Window::DoResize() const
+Aspect_TypeOfResize Cocoa_Window::DoResize()
{
if (myHView == NULL)
{
default: break;
}
- *((Standard_Integer* )&myXLeft ) = (Standard_Integer )aBounds.origin.x;
- *((Standard_Integer* )&myXRight ) = (Standard_Integer )(aBounds.origin.x + aBounds.size.width);
- *((Standard_Integer* )&myYTop ) = (Standard_Integer )aBounds.origin.y;
- *((Standard_Integer* )&myYBottom ) = (Standard_Integer )(aBounds.origin.y + aBounds.size.height);
+ myXLeft = (Standard_Integer )aBounds.origin.x;
+ myXRight = (Standard_Integer )(aBounds.origin.x + aBounds.size.width);
+ myYTop = (Standard_Integer )aBounds.origin.y;
+ myYBottom = (Standard_Integer )(aBounds.origin.y + aBounds.size.height);
return aMode;
}
// function : DoResize
// purpose :
// =======================================================================
-Aspect_TypeOfResize WNT_Window::DoResize() const
+Aspect_TypeOfResize WNT_Window::DoResize()
{
if (IsVirtual())
{
break;
} // end switch
- *((Standard_Integer* )&aXLeft ) = wp.rcNormalPosition.left;
- *((Standard_Integer* )&aXRight ) = wp.rcNormalPosition.right;
- *((Standard_Integer* )&aYTop ) = wp.rcNormalPosition.top;
- *((Standard_Integer* )&aYBottom) = wp.rcNormalPosition.bottom;
+ aXLeft = wp.rcNormalPosition.left;
+ aXRight = wp.rcNormalPosition.right;
+ aYTop = wp.rcNormalPosition.top;
+ aYBottom = wp.rcNormalPosition.bottom;
}
return mode;
Standard_EXPORT virtual void Unmap() const Standard_OVERRIDE;
//! Applies the resizing to the window <me>.
- Standard_EXPORT virtual Aspect_TypeOfResize DoResize() const Standard_OVERRIDE;
+ Standard_EXPORT virtual Aspect_TypeOfResize DoResize() Standard_OVERRIDE;
//! Apply the mapping change to the window <me>
//! and returns TRUE if the window is mapped at screen.
// function : DoResize
// purpose :
// =======================================================================
-Aspect_TypeOfResize Xw_Window::DoResize() const
+Aspect_TypeOfResize Xw_Window::DoResize()
{
if (myXWindow == 0)
{
default: break;
}
- *((Standard_Integer* )&myXLeft ) = aWinAttr.x;
- *((Standard_Integer* )&myXRight ) = aWinAttr.x + aWinAttr.width;
- *((Standard_Integer* )&myYTop ) = aWinAttr.y;
- *((Standard_Integer* )&myYBottom ) = aWinAttr.y + aWinAttr.height;
+ myXLeft = aWinAttr.x;
+ myXRight = aWinAttr.x + aWinAttr.width;
+ myYTop = aWinAttr.y;
+ myYBottom = aWinAttr.y + aWinAttr.height;
return aMode;
}
Standard_EXPORT virtual void Unmap() const Standard_OVERRIDE;
//! Applies the resizing to the window <me>
- Standard_EXPORT virtual Aspect_TypeOfResize DoResize() const Standard_OVERRIDE;
+ Standard_EXPORT virtual Aspect_TypeOfResize DoResize() Standard_OVERRIDE;
//! Apply the mapping change to the window <me>
Standard_EXPORT virtual Standard_Boolean DoMapping() const Standard_OVERRIDE;