1- // Service endpoint configurations
2-
3- SERVER_ADDRESS = "https://api.cognitive.microsoft.com" ;
4- ENDPOINT_URL = SERVER_ADDRESS + "/inkrecognizer/v1.0-preview/recognizer " ;
5- SUBSCRIPTION_KEY = "" ;
6-
7- // Languages for user to try
8- LANGUAGE_TAGS_TO_TRY = [ "en-US" , "de-DE" , "en-GB" , "fr-FR" , "hi-IN" , "ja-JP" , "ko-KR" , "zh-CN" ] ;
9-
10- // Window.devicePixelRatio could change, e.g., when user drags the window to a display with different pixel density,
11- // however, there is no callback or event available to detect the change.
12- // In this sample, we assume devicePixelRatio doesn't change.
13- PIXEL_RATIO = window . devicePixelRatio ;
14- MILLIMETER_PER_INCH = 25.4 ;
15- PIXEL_PER_INCH = 96 ;
16- MILLIMETER_TO_PIXELS = PIXEL_PER_INCH / ( MILLIMETER_PER_INCH * PIXEL_RATIO ) ;
1+ // Service endpoint configurations
2+
3+ SERVER_ADDRESS = "https://api.cognitive.microsoft.com" ;
4+ ENDPOINT_URL = SERVER_ADDRESS + "/inkrecognizer/v1.0-preview/recognize " ;
5+ SUBSCRIPTION_KEY = "" ;
6+
7+ // Languages for user to try
8+ LANGUAGE_TAGS_TO_TRY = [ "en-US" , "de-DE" , "en-GB" , "fr-FR" , "hi-IN" , "ja-JP" , "ko-KR" , "zh-CN" ] ;
9+
10+ // Window.devicePixelRatio could change, e.g., when user drags the window to a display with different pixel density,
11+ // however, there is no callback or event available to detect the change.
12+ // In this sample, we assume devicePixelRatio doesn't change.
13+ PIXEL_RATIO = window . devicePixelRatio ;
14+ MILLIMETER_PER_INCH = 25.4 ;
15+ PIXEL_PER_INCH = 96 ;
16+ MILLIMETER_TO_PIXELS = PIXEL_PER_INCH / ( MILLIMETER_PER_INCH * PIXEL_RATIO ) ;
1717PIXEL_TO_MILLIMETERS = MILLIMETER_PER_INCH * PIXEL_RATIO / PIXEL_PER_INCH ;
0 commit comments