本文整理汇总了C++中URect::right方法的典型用法代码示例。如果您正苦于以下问题:C++ URect::right方法的具体用法?C++ URect::right怎么用?C++ URect::right使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类URect
的用法示例。
在下文中一共展示了URect::right方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: on_draw
//---------------------------------------------------------------------------------------
void HyperlinkCtrl::on_draw(Drawer* pDrawer, RenderOptions& UNUSED(opt))
{
select_font();
Color color = (m_fEnabled ? m_currentColor : Color(192, 192, 192));
pDrawer->set_text_color(color);
URect pos = determine_text_position_and_size();
pDrawer->draw_text(pos.x, pos.y, m_label);
//text decoration
if (m_style->text_decoration() == ImoStyle::k_decoration_underline)
{
float factor = (m_language == "zh_CN" ? 0.30f : 0.12f);
LUnits y = pos.y + pos.height * factor;
pDrawer->begin_path();
pDrawer->fill(color);
pDrawer->stroke(color);
pDrawer->stroke_width( pos.height * 0.075f );
pDrawer->move_to(pos.x, y);
pDrawer->hline_to( pos.right() );
pDrawer->end_path();
}
}
示例2: caret_at_end_of_staff
//---------------------------------------------------------------------------------------
void ScoreCaretPositioner::caret_at_end_of_staff(Caret* pCaret)
{
//cursor is at end of a staff or end of score. Score is not empty.
//No current staffobj but a previous one must exist.
//Place cursor 0.8 lines (8 tenths) at the right of last staffobj
//get info for prev object
SpElementCursorState spState = m_pScoreCursor->get_state();
m_pScoreCursor->move_prev();
ImoId id = m_pScoreCursor->id();
int staff = m_pScoreCursor->staff();
m_pScoreCursor->restore_state(spState);
URect bounds = get_bounds_for_imo(id, staff);
bounds.x += tenths_to_logical(8);
set_caret_y_pos_and_height(&bounds, id, staff);
pCaret->set_type(Caret::k_line);
pCaret->set_position( UPoint(bounds.right(), bounds.top()) );
pCaret->set_size( USize(bounds.get_width(), bounds.get_height()) );
set_caret_timecode(pCaret);
}