Yandex Mobile Ads
Loading...
Searching...
No Matches
Assets
YandexMobileAds
ScreenUtils.cs
Go to the documentation of this file.
1
/*
2
* This file is a part of the Yandex Advertising Network
3
*
4
* Version for iOS (C) 2023 YANDEX
5
*
6
* You may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at https://legal.yandex.com/partner_ch/
8
*/
9
10
using
YandexMobileAds.Common;
11
using
YandexMobileAds.Platforms;
12
13
namespace
YandexMobileAds
14
{
15
public
static
class
ScreenUtils
16
{
24
public
static
int
ConvertPixelsToDp
(
int
pixels)
25
{
26
IScreenClient client = YandexMobileAdsClientFactory.CreateScreenClient();
27
return
(
int
)(pixels / client.GetScreenScale());
28
}
29
}
30
}
YandexMobileAds.ScreenUtils
Definition
ScreenUtils.cs:16
YandexMobileAds.ScreenUtils.ConvertPixelsToDp
static int ConvertPixelsToDp(int pixels)
Converts physical pixels to density independent pixels.
Definition
ScreenUtils.cs:24
YandexMobileAds
Definition
AppOpenAd.cs:15
Generated by
1.9.8