Autor Beitrag
C#
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 561
Erhaltene Danke: 65

Windows 10, Kubuntu, Android
Visual Studio 2017, C#, C++/CLI, C++/CX, C++, F#, R, Python
BeitragVerfasst: Mi 04.01.12 18:11 
Hey Leute,

kann mir jemand sagen wie ich in C# Millimeter in Pixel umrechnen kann. Aslo...
ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
int x = 100 //Millimeter

private void CalculatePixel()
{
  //tut was
  x = //xyz millimeter
}

für Delphi gibts ja die Möglichkeit pixelsperinch. Aber zu C# hab ich nix gefunden.

_________________
Der längste Typ-Name im .NET-Framework ist: ListViewVirtualItemsSelectionRangeChangedEventHandler
Ralf Jansen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 4700
Erhaltene Danke: 991


VS2010 Pro, VS2012 Pro, VS2013 Pro, VS2015 Pro, Delphi 7 Pro
BeitragVerfasst: Mi 04.01.12 18:15 
Welche Technik?

Bei einem Graphics Object (zum Beispiel in einem Winforms Paint Event) hätte man dort DpiX bzw. DpiY.
C# Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 561
Erhaltene Danke: 65

Windows 10, Kubuntu, Android
Visual Studio 2017, C#, C++/CLI, C++/CX, C++, F#, R, Python
BeitragVerfasst: Mi 04.01.12 18:17 
Nein. Am besten wäre ein einfacher Integer-Wert.
Dieser soll später ein Faktor bei der Beschleunigung spielen.
Das ganze benutzt das XNA-Framework.

_________________
Der längste Typ-Name im .NET-Framework ist: ListViewVirtualItemsSelectionRangeChangedEventHandler
C# Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 561
Erhaltene Danke: 65

Windows 10, Kubuntu, Android
Visual Studio 2017, C#, C++/CLI, C++/CX, C++, F#, R, Python
BeitragVerfasst: Mi 04.01.12 21:37 
Wen es interssiert ich hab die Lösung gefunden:
stackoverflow.com/qu.../centimeter-to-pixel

Hier wird es wie user profile iconRalf Jansen schon gesagt hat über ein Graphics Objekt gerechnet.

_________________
Der längste Typ-Name im .NET-Framework ist: ListViewVirtualItemsSelectionRangeChangedEventHandler