本文整理汇总了C++中Stage::GetDpi方法的典型用法代码示例。如果您正苦于以下问题:C++ Stage::GetDpi方法的具体用法?C++ Stage::GetDpi怎么用?C++ Stage::GetDpi使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stage
的用法示例。
在下文中一共展示了Stage::GetDpi方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UtcDaliStageGetDpiN
/*
* This is not a true negative test, we are checking the DPI if it has not been set.
* A test for setting negative DPI values would be part of the application core utc tests.
*/
int UtcDaliStageGetDpiN(void)
{
TestApplication application; // Initializes core DPI to default values
Stage stage = Stage::GetCurrent();
Vector2 dpi = stage.GetDpi();
DALI_TEST_EQUALS( dpi.x, 220.0f, TEST_LOCATION );
DALI_TEST_EQUALS( dpi.y, 217.0f, TEST_LOCATION );
END_TEST;
}
示例2: UtcDaliStageGetDpiP3
int UtcDaliStageGetDpiP3(void)
{
TestApplication application( 480, 800, 72.0f, 120.0f ); // Initializes core DPI with specific values
Stage stage = Stage::GetCurrent();
// Test that setting core DPI explicitly also sets up the Stage's DPI.
Vector2 dpi = stage.GetDpi();
DALI_TEST_EQUALS( dpi.x, 72.0f, TEST_LOCATION );
DALI_TEST_EQUALS( dpi.y, 120.0f, TEST_LOCATION) ;
END_TEST;
}
示例3: UtcDaliStageGetDpiP1
int UtcDaliStageGetDpiP1(void)
{
TestApplication application; // Initializes core DPI to default values
Stage stage = Stage::GetCurrent();
// Test the default DPI.
Vector2 dpi = stage.GetDpi();
DALI_TEST_EQUALS( dpi.x, static_cast<float>( TestApplication::DEFAULT_HORIZONTAL_DPI ), TEST_LOCATION );
DALI_TEST_EQUALS( dpi.y, static_cast<float>( TestApplication::DEFAULT_VERTICAL_DPI ), TEST_LOCATION );
END_TEST;
}
示例4: UtcDaliStageGetDpiP2
int UtcDaliStageGetDpiP2(void)
{
TestApplication application; // Initializes core DPI to default values
// Test that setting core DPI explicitly also sets up the Stage's DPI.
application.GetCore().SetDpi( 200, 180 );
Stage stage = Stage::GetCurrent();
Vector2 dpi = stage.GetDpi();
DALI_TEST_EQUALS( dpi.x, 200.0f, TEST_LOCATION );
DALI_TEST_EQUALS( dpi.y, 180.0f, TEST_LOCATION );
END_TEST;
}