NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <corelib/ncbistd.hpp>
#include <corelib/ncbi_limits.h>
#include <png.h>
#include <zlib.h>
#include "remove_header_conflicts.hpp"
#include <wx/platform.h>
#include "cn3d_png.hpp"
#include "cn3d_glcanvas.hpp"
#include "opengl_renderer.hpp"
#include "progress_meter.hpp"
#include "cn3d_tools.hpp"
#include "messenger.hpp"
#include <wx/image.h>
#include <wx/statline.h>
#include <wx/spinbutt.h>
#include <wx/spinctrl.h>
#include <wx/splitter.h>
#include <wx/listctrl.h>
#include <wx/treectrl.h>
#include <wx/notebook.h>
#include <wx/grid.h>
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
class | PNGOptionsDialog |
Macros | |
#define | ID_TEXT 10000 |
#define | ID_B_BROWSE 10001 |
#define | ID_T_NAME 10002 |
#define | ID_T_WIDTH 10003 |
#define | ID_T_HEIGHT 10004 |
#define | ID_C_ASPECT 10005 |
#define | ID_C_INTERLACE 10006 |
#define | ID_B_OK 10007 |
#define | ID_B_CANCEL 10008 |
#define | DECLARE_AND_FIND_WINDOW_RETURN_ON_ERR(var, id, type) |
#define | DECLARE_AND_FIND_WINDOW_RETURN_RESULT_ON_ERR(var, id, type, errResult) |
#define | GET_AND_IS_VALID_SIZE(textctrl, var) (textctrl->GetValue().ToDouble(&var) && var >= 1 && fmod(var, 1.0) == 0.0 && var <= kMax_Int) |
Functions | |
wxSizer * | SetupPNGOptionsDialog (wxPanel *parent, bool call_fit=TRUE, bool set_sizer=TRUE) |
static bool | GetOutputParameters (wxString *outputFilename, int *width, int *height, bool *interlaced) |
static void | writepng_error_handler (png_structp png_ptr, png_const_charp msg) |
static void | write_row_callback (png_structp png_ptr, png_uint_32 row, int pass) |
bool | ExportPNG (Cn3DGLCanvas *glCanvas, OpenGLRenderer *renderer, const string &outputFilename, int outputWidth, int outputHeight, bool interlaced) |
Variables | |
USING_NCBI_SCOPE | |
static ProgressMeter * | progressMeter = NULL |
static const int | PROGRESS_RESOLUTION = 100 |
static const int | MAX_BUFFER_PIXELS = 1000000 |
static int | nRows |
const wxWindowID | ButtonID = wxID_HIGHEST + 1 |
#define DECLARE_AND_FIND_WINDOW_RETURN_ON_ERR | ( | var, | |
id, | |||
type | |||
) |
#define DECLARE_AND_FIND_WINDOW_RETURN_RESULT_ON_ERR | ( | var, | |
id, | |||
type, | |||
errResult | |||
) |
Definition at line 146 of file cn3d_png.cpp.
#define GET_AND_IS_VALID_SIZE | ( | textctrl, | |
var | |||
) | (textctrl->GetValue().ToDouble(&var) && var >= 1 && fmod(var, 1.0) == 0.0 && var <= kMax_Int) |
Definition at line 156 of file cn3d_png.cpp.
#define ID_B_BROWSE 10001 |
Definition at line 91 of file cn3d_png.cpp.
#define ID_B_CANCEL 10008 |
Definition at line 98 of file cn3d_png.cpp.
#define ID_B_OK 10007 |
Definition at line 97 of file cn3d_png.cpp.
#define ID_C_ASPECT 10005 |
Definition at line 95 of file cn3d_png.cpp.
#define ID_C_INTERLACE 10006 |
Definition at line 96 of file cn3d_png.cpp.
#define ID_T_HEIGHT 10004 |
Definition at line 94 of file cn3d_png.cpp.
#define ID_T_NAME 10002 |
Definition at line 92 of file cn3d_png.cpp.
#define ID_T_WIDTH 10003 |
Definition at line 93 of file cn3d_png.cpp.
#define ID_TEXT 10000 |
Definition at line 90 of file cn3d_png.cpp.
bool ExportPNG | ( | Cn3DGLCanvas * | glCanvas, |
OpenGLRenderer * | renderer, | ||
const string & | outputFilename, | ||
int | outputWidth, | ||
int | outputHeight, | ||
bool | interlaced | ||
) |
Definition at line 392 of file cn3d_png.cpp.
References OpenGLRenderer::ComputeBestView(), OpenGLRenderer::Construct(), ctx, OpenGLRenderer::Display(), ERRORMSG, False, GetOutputParameters(), GlobalMessenger(), OpenGLRenderer::HasASNViewSettings(), i, INFOMSG, OpenGLRenderer::Init(), int, IsWindowedMode(), MAX_BUFFER_PIXELS, OpenGLRenderer::NewView(), nRows, NULL, out(), Messenger::PostRedrawAllStructures(), PROGRESS_RESOLUTION, progressMeter, r(), OpenGLRenderer::RecreateQuadric(), Cn3DGLCanvas::renderer, OpenGLRenderer::RestoreSavedView(), Cn3DGLCanvas::SetCurrent(), Cn3DGLCanvas::SetGLFontFromRegistry(), Cn3DGLCanvas::SuspendRendering(), TRACEMSG, WARNINGMSG, write_row_callback(), writepng_error_handler(), and Z_BEST_COMPRESSION.
Referenced by StructureWindow::OnPNG(), and Cn3DNoWin::Run().
|
static |
Definition at line 342 of file cn3d_png.cpp.
References PNGOptionsDialog::Activate(), PNGOptionsDialog::GetValues(), NULL, and ok.
Referenced by ExportPNG().
Definition at line 865 of file cn3d_png.cpp.
References ID_B_BROWSE, ID_B_CANCEL, ID_B_OK, ID_C_ASPECT, ID_C_INTERLACE, ID_T_HEIGHT, ID_T_NAME, ID_T_WIDTH, ID_TEXT, and TRUE.
Referenced by PNGOptionsDialog::PNGOptionsDialog().
Definition at line 366 of file cn3d_png.cpp.
References int, nRows, PROGRESS_RESOLUTION, progressMeter, row, and ProgressMeter::SetValue().
Referenced by ExportPNG().
|
static |
Definition at line 351 of file cn3d_png.cpp.
References ERRORMSG, and msg().
Referenced by ExportPNG().
const wxWindowID ButtonID = wxID_HIGHEST + 1 |
Definition at line 159 of file cn3d_png.cpp.
Definition at line 114 of file cn3d_png.cpp.
Referenced by PNGOptionsDialog::Activate(), ExportPNG(), and PNGOptionsDialog::OnChangeSize().
|
static |
Definition at line 115 of file cn3d_png.cpp.
Referenced by BLAST_Matrix::BLAST_Matrix(), ConservationColorer::CalculateBasicConservationColors(), ConservationColorer::CalculateFitConservationColors(), CondensedColumn::CondensedColumn(), AlignmentUtility::DoLeaveNOut(), ExportPNG(), BlockExtender::findCommonExtension(), GetAlignmentColumnsForCD(), AlignmentUtility::GetNRows(), PssmMaker::getPssmColumnResidues(), CVcfTableSelection::GetRows(), IntersectByMaster(), CDUpdater::mergePending(), PssmMaker::printAlignmentByColumn(), ReorderStructureAlignments(), SequenceDisplay::RowsAdded(), and write_row_callback().
Definition at line 114 of file cn3d_png.cpp.
Referenced by ExportPNG(), and write_row_callback().
|
static |
Definition at line 113 of file cn3d_png.cpp.
Referenced by ExportPNG(), and write_row_callback().
USING_NCBI_SCOPE |
Definition at line 108 of file cn3d_png.cpp.