Added debug code to clipbard

changed colour reporting to PS


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-03-31 13:01:43 +00:00
parent cd7f122719
commit 3c1b65a4a8
3 changed files with 18 additions and 13 deletions

View File

@@ -995,10 +995,9 @@ void wxPostScriptDC::SetPen( const wxPen& pen )
if (!(red == m_currentRed && green == m_currentGreen && blue == m_currentBlue)) if (!(red == m_currentRed && green == m_currentGreen && blue == m_currentBlue))
{ {
long redPS = (long) (((int) red) / 255.0); float redPS = (float)(red) / 255.0;
long bluePS = (long) (((int) blue) / 255.0); float bluePS = (float)(blue) / 255.0;
long greenPS = (long) (((int) green) / 255.0); float greenPS = (float)(green) / 255.0;
*m_pstream << redPS << " " << greenPS << " " << bluePS << " setrgbcolor\n"; *m_pstream << redPS << " " << greenPS << " " << bluePS << " setrgbcolor\n";
m_currentRed = red; m_currentRed = red;
@@ -1016,9 +1015,9 @@ void wxPostScriptDC::SetBrush( const wxBrush& brush )
m_brush = brush; m_brush = brush;
// Brush colour // Brush colour
unsigned char red = m_brush.GetColour ().Red (); unsigned char red = m_brush.GetColour().Red();
unsigned char blue = m_brush.GetColour ().Blue (); unsigned char blue = m_brush.GetColour().Blue();
unsigned char green = m_brush.GetColour ().Green (); unsigned char green = m_brush.GetColour().Green();
if (!m_colour) if (!m_colour)
{ {
@@ -1036,9 +1035,9 @@ void wxPostScriptDC::SetBrush( const wxBrush& brush )
if (!(red == m_currentRed && green == m_currentGreen && blue == m_currentBlue)) if (!(red == m_currentRed && green == m_currentGreen && blue == m_currentBlue))
{ {
long redPS = (long) (((int) red) / 255.0); float redPS = (float)(red) / 255.0;
long bluePS = (long) (((int) blue) / 255.0); float bluePS = (float)(blue) / 255.0;
long greenPS = (long) (((int) green) / 255.0); float greenPS = (float)(green) / 255.0;
*m_pstream << redPS << " " << greenPS << " " << bluePS << " setrgbcolor\n"; *m_pstream << redPS << " " << greenPS << " " << bluePS << " setrgbcolor\n";
m_currentRed = red; m_currentRed = red;
m_currentBlue = blue; m_currentBlue = blue;
@@ -1074,9 +1073,9 @@ void wxPostScriptDC::DrawText( const wxString& text, long x, long y, bool WXUNUS
if (!(red == m_currentRed && green == m_currentGreen && blue == m_currentBlue)) if (!(red == m_currentRed && green == m_currentGreen && blue == m_currentBlue))
{ {
long redPS = (long) (((int) red) / 255.0); float redPS = (float)(red) / 255.0;
long bluePS = (long) (((int) blue) / 255.0); float bluePS = (float)(blue) / 255.0;
long greenPS = (long) (((int) green) / 255.0); float greenPS = (float)(green) / 255.0;
*m_pstream << redPS << " " << greenPS << " " << bluePS << " setrgbcolor\n"; *m_pstream << redPS << " " << greenPS << " " << bluePS << " setrgbcolor\n";
m_currentRed = red; m_currentRed = red;

View File

@@ -75,6 +75,9 @@ targets_selection_received( GtkWidget *WXUNUSED(widget),
for (unsigned int i=0; i<selection_data->length/sizeof(GdkAtom); i++) for (unsigned int i=0; i<selection_data->length/sizeof(GdkAtom); i++)
{ {
char *name = gdk_atom_name (atoms[i]);
if (name) printf( "Format available: %s.\n", name );
if (atoms[i] == clipboard->m_targetRequested) if (atoms[i] == clipboard->m_targetRequested)
{ {
clipboard->m_formatSupported = TRUE; clipboard->m_formatSupported = TRUE;

View File

@@ -75,6 +75,9 @@ targets_selection_received( GtkWidget *WXUNUSED(widget),
for (unsigned int i=0; i<selection_data->length/sizeof(GdkAtom); i++) for (unsigned int i=0; i<selection_data->length/sizeof(GdkAtom); i++)
{ {
char *name = gdk_atom_name (atoms[i]);
if (name) printf( "Format available: %s.\n", name );
if (atoms[i] == clipboard->m_targetRequested) if (atoms[i] == clipboard->m_targetRequested)
{ {
clipboard->m_formatSupported = TRUE; clipboard->m_formatSupported = TRUE;