public static wx.Bitmap ListaBitmaps(int index) { if ((index == 0) || (index == BMP_CLIENTE)) { wx.Image image = new wx.Image("Livrus_wdr/ListaBitmaps_0.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } if ((index == 1) || (index == BMP_LIVRO)) { wx.Image image = new wx.Image("Livrus_wdr/ListaBitmaps_1.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } if ((index == 2) || (index == BMP_LIVROS)) { wx.Image image = new wx.Image("Livrus_wdr/ListaBitmaps_2.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } if ((index == 3) || (index == BMP_SOBRE)) { wx.Image image = new wx.Image("Livrus_wdr/ListaBitmaps_3.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } if ((index == 4) || (index == BMP_SAIR)) { wx.Image image = new wx.Image("Livrus_wdr/ListaBitmaps_4.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } if ((index == 5) || (index == BMP_LOGIN)) { wx.Image image = new wx.Image("Livrus_wdr/ListaBitmaps_5.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } if ((index == 6) || (index == BMP_SPLASH)) { wx.Image image = new wx.Image("Livrus_wdr/ListaBitmaps_6.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } if ((index == 7) || (index == BMP_LIVRUSVIRTUS)) { wx.Image image = new wx.Image("Livrus_wdr/ListaBitmaps_7.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } return(new wx.Bitmap()); }
public void Paint(Window dest, bool fillBg) { // TestProgram.TestSomething3(this, dest, fillBg); // TestProgram.TestSomething4(this, dest, fillBg); //#if WIN32 // wxBufferedPaintDC dc(dest); //#else // ClientDC dc = new ClientDC(dest); //#endif // dest.PrepareDC(dc); // BufferedDC wdc = new BufferedDC(dc, m_pixmap); // Erik's (temporary) patch PaintDC dc2 = new PaintDC(dest); MemoryDC mDC = new MemoryDC(); wx.Bitmap bitmap = GlobalVariables.current_grid.m_pixmap; mDC.SelectObject(bitmap); dc2.DrawBitmap(bitmap, 0, 0, true); // mDC.DrawRectangle(10, 10, 100, 100); mDC.SelectObject(wx.Bitmap.NullBitmap); dc2.DrawBitmap(bitmap, 30, 30); mDC.Dispose(); dc2.Dispose(); //needed }
// Toolbar functions // Bitmap functions public static wx.Bitmap MyBitmapsFunc(int index) { if (index == 0) { wx.Image image = new wx.Image("menu_wdr/MyBitmapsFunc_0.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } return(new wx.Bitmap()); }
// Toolbar functions // Bitmap functions public static wx.Bitmap MyBitmapsFunc( int index ) { if (index == 0) { wx.Image image = new wx.Image( "menu_wdr/MyBitmapsFunc_0.png" ); wx.Bitmap bitmap = new wx.Bitmap( image ); return bitmap; } return new wx.Bitmap(); }
public grid(Window parent, int width, int height) { m_pixmap = new wx.Bitmap(width, height); m_parent = parent; m_dc = new MemoryDC(); m_hmult = 1; m_vmult = 1; m_xBase = 0; m_yBase = 0; }
public void OnPaint(object sender, Event evt) { using (MemoryDC dc = new MemoryDC()) { wx.Bitmap m_pixmap = new wx.Bitmap(100, 100); dc.SelectObject(m_pixmap); // Erik: Test code dc.Pen = new wx.Pen(wx.Colour.wxGREEN, 100); dc.DrawLine(0, 0, 1000, 1000); dc.SelectObject(wx.Bitmap.NullBitmap); } }
// Bitmap functions public static wx.Bitmap MyBitmapsFunc( int index ) { if (index == 0) { wx.Image image = new wx.Image( "toolbar_wdr/MyBitmapsFunc_0.png" ); wx.Bitmap bitmap = new wx.Bitmap( image ); return bitmap; } if (index == 1) { wx.Image image = new wx.Image( "toolbar_wdr/MyBitmapsFunc_1.png" ); wx.Bitmap bitmap = new wx.Bitmap( image ); return bitmap; } if (index == 2) { wx.Image image = new wx.Image( "toolbar_wdr/MyBitmapsFunc_2.png" ); wx.Bitmap bitmap = new wx.Bitmap( image ); return bitmap; } if (index == 3) { wx.Image image = new wx.Image( "toolbar_wdr/MyBitmapsFunc_3.png" ); wx.Bitmap bitmap = new wx.Bitmap( image ); return bitmap; } if (index == 4) { wx.Image image = new wx.Image( "toolbar_wdr/MyBitmapsFunc_4.png" ); wx.Bitmap bitmap = new wx.Bitmap( image ); return bitmap; } if (index == 5) { wx.Image image = new wx.Image( "toolbar_wdr/MyBitmapsFunc_5.png" ); wx.Bitmap bitmap = new wx.Bitmap( image ); return bitmap; } return new wx.Bitmap(); }
// Bitmap functions public static wx.Bitmap MyBitmapsFunc(int index) { if (index == 0) { wx.Image image = new wx.Image("toolbar_wdr/MyBitmapsFunc_0.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } if (index == 1) { wx.Image image = new wx.Image("toolbar_wdr/MyBitmapsFunc_1.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } if (index == 2) { wx.Image image = new wx.Image("toolbar_wdr/MyBitmapsFunc_2.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } if (index == 3) { wx.Image image = new wx.Image("toolbar_wdr/MyBitmapsFunc_3.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } if (index == 4) { wx.Image image = new wx.Image("toolbar_wdr/MyBitmapsFunc_4.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } if (index == 5) { wx.Image image = new wx.Image("toolbar_wdr/MyBitmapsFunc_5.png"); wx.Bitmap bitmap = new wx.Bitmap(image); return(bitmap); } return(new wx.Bitmap()); }