• 大小: 991KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-07
  • 语言: 其他
  • 标签: 开源软件  

资源简介

MathCast is an equation editor, an application that allows you to input mathematical equations. These equations can be used in written documents, webpages, databases, etc. They could be rendered graphically to the screen, to picture files, or to MathML - today's leading standard language for describing mathematics.

资源截图

代码片段和文件信息

//This file is licenced under the GPL read the notice located at Main.cpp

#include “bmpHelper.h“

HBITMAP DSCreateDIBSection( DWORD dwX DWORD dwY WORD wBits );
BOOL DSStoreDIBSectionInBMPFile( LPTSTR szFileName HBITMAP hBitmap );


bool BMPHelper::initialize()
{
return true;
}

bool BMPHelper::terminate()
{
    return true;
}


void BMPHelper::drawBMP(HDC hdc int x int y HBITMAP hbmp)
{
  BITMAP bm;
Getobject(hbmp sizeof(BITMAP) &bm);
HDC hdcMem= CreateCompatibleDC(hdc);
  Selectobject(hdcMem hbmp);
BitBlt(hdc x y bm.bmWidth bm.bmHeight hdcMem 00 SRCCOPY);
DeleteDC(hdcMem);
}


void BMPHelper::saveBMP(const wchar_t* filename RECT rect int bpp)
{
HDC hdc= GetDC(HWND_DESKTOP);
HDC hdcMem= CreateCompatibleDC(hdc);

HBITMAP hbmp= DSCreateDIBSection(rect.right rect.bottom bpp);
Selectobject(hdcMemhbmp);
BitBlt(hdcMem 0 0 rect.right rect.bottom hdc rect.left rect.top SRCCOPY);

DSStoreDIBSectionInBMPFile((wchar_t*)filename hbmp);

Deleteobject(hbmp);
  DeleteDC(hdcMem);
DeleteDC(hdc);
}

void BMPHelper::clipBoardBMP(RECT rect)
{
   HDC hdc= GetDC(HWND_DESKTOP);
HDC hdcMem= CreateCompatibleDC(hdc);

HBITMAP hbmp= CreateCompatibleBitmap(hdc rect.right rect.bottom);
Selectobject(hdcMemhbmp);
BitBlt(hdcMem 0 0 rect.right rect.bottom hdc rect.left rect.top SRCCOPY);

    OpenClipboard(hwnd);
    EmptyClipboard();
    SetClipboardData(CF_BITMAP hbmp);
    CloseClipboard();

Deleteobject(hbmp);
  DeleteDC(hdcMem);
DeleteDC(hdc);
}

void BMPHelper::clipBoardEMF(RECT rect int height int width int bpp)
{
height = width*rect.bottom/rect.right;

HDC hdc  = GetDC(HWND_DESKTOP);
HDC hdcMem  = CreateCompatibleDC(hdc);

HBITMAP hbmp = DSCreateDIBSection(rect.right rect.bottom bpp);
Selectobject(hdcMemhbmp);
BitBlt(hdcMem 0 0 rect.right rect.bottom hdc rect.left rect.top SRCCOPY);

RECT mrect   = { 0 0 (int)(width*26.6) (int)(height*26.6)};
if (settings.getCopyType()==EMF2003_COPY)
{
mrect.right  = (width  * GetDeviceCaps(hdc HORZSIZE) * 100)/GetDeviceCaps(hdc HORZRES); 
mrect.bottom = (height * GetDeviceCaps(hdc VERTSIZE) * 100)/GetDeviceCaps(hdc VERTRES); 
}
HDC hdcmeta  = CreateEnhmetaFile(hdc NULL &mrect NULL);

SIZE size;
BITMAP bmpinfo;
GetBitmapDimensionEx(hbmp &size);
Selectobject(hdcMemhbmp);
Getobject(hbmp sizeof(BITMAP) &bmpinfo);

int widthb  = width;
int heightb = height;
if (settings.getCopyType()==EMF2000_COPY)
{
int nMapMode = GetMapMode(hdc);
SetMapMode(hdcMM_HIMETRIC);
POINT points[1] = {width height};
DPtoLP(hdc&points[0]1);
SetMapMode(hdcnMapMode);
int xExt = MulDiv(width 2540 GetDeviceCaps(hdc LOGPIXELSX));
int yExt = MulDiv(height 2540 GetDeviceCaps(hdc LOGPIXELSY));
widthb = (int)((double)width*xExt/(double)points[0].x);
heightb = (int)(-(double)height*yExt/(double)points[0].y);
}

StretchB

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件       45056  2004-09-04 11:06  BMP2PNG.EXE
     文件        5302  2008-05-06 20:38  changelog.txt
     文件         832  2007-02-25 01:09  DefaultSettings.xml
     文件      137469  2008-05-07 12:56  Documentation.chm
     目录           0  2008-04-21 22:41  Examples\
     文件        6186  2007-04-09 00:41  Examples\0 - Basics.xml
     文件        4121  2006-01-18 23:41  Examples\1 - styles.xml
     文件        4824  2007-04-09 00:52  Examples\2 - Advanced.xml
     文件        7929  2007-09-29 12:26  Examples\3 - Matrix.xml
     文件       18000  2005-05-21 11:07  Examples\4 - Mathcasting.xml
     文件       93644  2007-02-18 09:43  Examples\Calulus 2.xml
     文件        8871  2006-03-29 00:54  Examples\Convolution.xml
     文件       56220  2005-06-13 00:40  Examples\Electricity.xml
     文件        1567  2005-05-27 00:49  Examples\Energy.png
     文件       22876  2004-10-14 05:09  Examples\Laplace.xml
     文件       10456  2005-11-07 17:49  Examples\Maxwell.xml
     文件        7088  2006-04-04 04:44  Examples\Motor.emf
     文件       16694  2005-05-27 00:48  Examples\Power.bmp
     文件        1111  2007-05-19 03:13  Examples\Schrodinger.mml
     文件       13824  2005-01-23 10:43  Examples\Vector Poynting.xml
     目录           0  2008-05-06 19:38  Interface\
     文件      429570  2005-01-14 09:15  Interface\3D.png
     文件        3126  2004-06-24 10:07  Interface\add.bmp
     文件        2235  2004-07-18 21:04  Interface\back.png
     文件        4723  2004-07-18 21:05  Interface\backbig.png
     文件        8414  2004-07-02 12:59  Interface\cancel.bmp
     文件        3126  2004-11-15 05:57  Interface\copy.bmp
     文件        3126  2004-07-02 12:47  Interface\cut.bmp
     文件        2386  2004-07-18 21:44  Interface\defaults.png
     文件        3126  2004-07-02 12:47  Interface\delete.bmp
     文件        2994  2007-10-03 16:05  Interface\Download.html
............此处省略203个文件信息

评论

共有 条评论