コード例 #1
0
ファイル: zoomer.cpp プロジェクト: pocketbook-free/djviewer
// draw zoomer
void Zoomer::Draw(int gu)
{
    // draw frame
    int xframe, yframe, wframe, hframe;
    GetWindowFrameRect(xframe, yframe, wframe, hframe);
    iv_windowframe(xframe, yframe, wframe, hframe, BLACK, WHITE, const_cast<char*>("@Zoom"), 0);

    // draw bitmap
    int xbitmap, ybitmap, wbitmap, hbitmap;
    GetBitmapFrameRect(xbitmap, ybitmap, wbitmap, hbitmap);
    DrawBitmap(xbitmap, ybitmap, &djvumode);

    // draw description
    char buffer[128] = {0};
    s_Strategies[m_Position]->GetDescription(buffer, sizeof(buffer));
    SetFont(menu_n_font, 0);
    DrawTextRect(xframe, yframe + hframe - 1.25 * menu_n_font->height, wframe, 1, buffer, ALIGN_CENTER);

    // current selection
    InvertAreaBW(xbitmap + m_IconWidth * m_Position, ybitmap, m_IconWidth, m_IconHeight);

	// update screen
	if (gu) {
		//PartialUpdate(xframe, yframe, wframe, hframe);
	} else {
		PartialUpdateBW(xframe, yframe, wframe, hframe);
	}
}
コード例 #2
0
void balda_keyboard_view_invert(balda_keyboard_view_t* kb, int x, int y)
{
	int rx = kb->l + x * (BALDA_VIEW_KEYBOARD_CELL_W + BALDA_VIEW_KEYBOARD_CELL_PADDING)
		- BALDA_VIEW_KEYBOARD_CELL_PADDING / 2;
	int ry = BALDA_VIEW_KEYBOARD_Y + y * (BALDA_VIEW_KEYBOARD_CELL_H + BALDA_VIEW_KEYBOARD_CELL_PADDING)
		- BALDA_VIEW_KEYBOARD_CELL_PADDING / 2;
	int w = BALDA_VIEW_KEYBOARD_CELL_W + BALDA_VIEW_KEYBOARD_CELL_PADDING;
	int h = BALDA_VIEW_KEYBOARD_CELL_H + BALDA_VIEW_KEYBOARD_CELL_PADDING;
	
	InvertAreaBW(rx, ry, w, h);
	balda_view_invalidate(kb->view, rx, ry, w, h, balda_true);
}
コード例 #3
0
	static void invert_item(int x, int y, int w, int h)
	{
		InvertAreaBW(x, y + 1, w, h - 2);
		InvertAreaBW(x + 1, y, w - 2, 1);
		InvertAreaBW(x + 1, y + h - 1, w - 2, 1);
	}