Scaling of Eclipse on High Density Displays

Slides:



Advertisements
Similar presentations
John Daintree Chief Architect Dyalog Ltd Gestures and Desktop Scaling in Windows.
Advertisements

Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
Vector vs. Bitmap SciVis V
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
V Obtained from a summer workshop in Guildford County July, 2014
Intelligent Tutoring System Mobile Communication Team Drew Boatwright Nakul Dureja Richard Liou.
Zinnia Bell. RAWimages are image files that have not yet processed, they contain minimally processed data from the image sensor of either a image scanner,
MVC pattern and implementation in java
Tutorial 4: Using CSS for Page Layout. 2 Objectives Session 4.1 Explore CSS layout Compare types of floating layouts Examine code for CSS layouts View.
Vector vs. Bitmap
Bitmap Vs. Vector Graphics. To create effective artwork, you need to understand some basic concepts about vector graphics versus bitmap images, resolution,
Higher Computing Computer Systems S. McCrossan 1 Higher Grade Computing Studies 1. Data Representation Data Representation – Why do we use binary? simplicity,
© 2012 Adobe Systems Incorporated. All Rights Reserved. Copyright 2012 Adobe Systems Incorporated. All rights reserved. ® INTRODUCTION TO FLASH ANIMATION.
® Copyright 2010 Adobe Systems Incorporated. All rights reserved. ® ® 1 INTRODUCTION TO ADOBE FLASH PROFESSIONAL CS5.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Using Android XML Resources.
Android for Java Developers Denver Java Users Group Jan 11, Mike
tiled Map Case Study: Rendering with JPanel © Allan C. Milne v
Lesson 05 // Web Design, Layout & Structure 1.Web Design/Designer-Coder Relationship 2.Fixed vs Fluid Website Layouts 3.Screen Resolutions.
1 Ethics of Computing MONT 113G, Spring 2012 Session 10 HTML Tables Graphics on the Web.
Android Boot Camp for Developers Using Java, 3E
Marr CollegeHigher ComputingSlide 1 Higher Computing: COMPUTER SYSTEMS Part 1: Data Representation – 6 hours.
The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include: a rich set of user interface components; a.
File Types. Terms Multimedia- the integration of text, sound, video and/or animation into a document Letters, brochures, newsletters, web pages or presentations.
ANDROID AND MODEL / VIEW / CONTROLLER. Slide 2 Design Patters Common solutions to programming problems are called design patterns Design patterns are.
1 Mobile Computing Handling Different Display Sizes Copyright 2015 by Janson Industries.
Graphics and Image Data Representations 1. Q1 How images are represented in a computer system? 2.
Guilford County SciVis V104.03
HTML5 and CSS3 Illustrated Unit F: Inserting and Working with Images.
© 2012 DigitalDay | MOBILE WEB DESIGN PRINCIPLES Best Practices Workshop 1.
ANDROID LAYOUTS AND WIDGETS. Slide 2 Introduction Parts of the Android screen Sizing widgets and fonts Layouts and their characteristics Buttons, checkboxes.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 7 Event-Driven Programming and Basic GUI Objects.
Photoshop CS6 – Nelson Unit 3: Photoshop CS6. Objectives Define photo editing software Start Photoshop and view the workspace Use the Zoom tool and the.
Vector vs. Bitmap. Vector Images Vector images (also called outline images) are images made with lines, text, and shapes. Test type is considered to be.
Unit 2.6 Data Representation Lesson 3 ‒ Images
Storing Graphics Nat 5 Data Representation Lesson 4a: Storing Graphics
Guided By: Dr. Mingon Kang
Microsoft Foundation Classes MFC
Java FX: Scene Builder.
Getting Started with Adobe Photoshop CS6
Data Representation Images.
Layers in Adobe After Effect
Chapter 3 Image Files © 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website,
Computer Systems Nat 4/5 Data Representation Lesson 4:
What is SVG?.
Vector vs. Bitmap.
Inserting and Working with Images
Scalable vector graphics
Adobe Flash Professional CS5 – Illustrated
Building a User Interface with Forms
Java Look-and-Feel Design Guidelines
Apache Cordova Overview
Java FX.
RESEARCH AND APPLY GRAPHIC DESIGN TECHNIQUES #3
Adapting UI for Different Screens and Orientations
Build /24/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny
Windows 7 Training.
Introduction to Operating System (OS)
Chapter 3 Image Files © 2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Android Layout Basics Topics
WPF AKEEL AHMED.
Mobile Computing With Android ACST 4550 Intro to Android, Part 3
INTRODUCTION TO ADOBE FLASH CS4
.NET and .NET Core 7. XAML Pan Wuming 2017.
INTRODUCTION TO FLASH ANIMATION
The Basic Usage and The Event Handling in Glade.
Computer Systems Nat 4.5 Computing Science Data Representation
Computer Systems Nat 4/5 Data Representation Lesson 4:
What is SVG?.
Various mobile devices
Presentation transcript:

Scaling of Eclipse on High Density Displays Sravan Kumar Lakkimsetti Committer SWT Project IBM India

Agenda What are High Density (HiDPI) displays? How is Eclipse impacted by HiDPI? Requirements Native OS level support Current and Proposed Solutions Solution from Eclipse/SWT Different Approaches Implementation details from SWT New APIs introduced and usage 9/17/2018

What are High Density displays Pixel density is measured by number of pixels/dots in an inch (PPI/DPI). Increasing with each year to get more clarity on the displays. 100% scaling levels for different operating systems Mac OS X - 72 dpi Windows - 96 dpi Linux/GTK+ - 96 dpi SWT considers displays with a dpi more than 144 (150% for Win/GTK+ and 200% for Mac OS X ) as High Density displays. 9/17/2018

Problems at high DPI levels Increasing the dpi makes the UI elements appear smaller. Even though they are of same pixel size. Eclipse/SWT are expected to render UI elements in the same size independent of pixel grid. This way the UI is consistent across displays. 9/17/2018

Requirements Requirements Work with current OS SDK base line API for Windows, GTK+ and Mac OS X API baselines used Mac OS X – API v10.9 Windows – Windows SDK v7.0 GTK+– v3.0 Support Scaling factors of 100%, 150% and 200%. Need to have different resolution images stored in separate bundles. Load only the required images corresponding to the scaling factor Make all the graphics functionality dpi aware The graphics api should accept coordinates in points instead of pixels (1 point width at 200% scaling is equal to 2 pixels wide) Scale-up all the images that do not have corresponding high dpi images. 9/17/2018

OS level support (Mac OS X ) Mac OS X scales up all the UI elements to the user comfort level (by default enabled) Uses multiple representations to the same image at different dpi levels The measurement on display is in points (logical pixels). At 100% 1 point width is equal to 1 pixel wide and at 200% it will be 2 pixels Pros No need to make any changes in the code to support high DPI Cons The graphical UI elements appear blurred. Possibility of maintaining high number of bitmaps in the eclipse session 9/17/2018

OS level support (Windows) Scaling up all the UI elements can be done using Display properties Control Panel->Appearance and Personalization->Display Can set the scaling factor in 100%, 125%, 150% etc Only Dpi Aware applications can be scaled. Text scales up as it is supplied by the Windows font service Cons the text will scale up but others like icons, drawn lines etc would not scale 9/17/2018

OS level support (Windows) - contd At 100% scale level At 200% scale level 9/17/2018

OS level support (Ubuntu) User can specify the scale factor using Display properties Can set the scaling factor in multiples of 1/8. Text scales up as it is supplied by the font service Cons the text will scale up but others like icons etc would not scale (very similar to Windows) 9/17/2018

OS support On Ubuntu 100% scaling 200% Scaling 9/17/2018

Current and Proposed Solutions Mac OS X Have multiple bitmaps associated with the image object. OS will select the appropriate bitmap while rendering Works with integer multiples of scaling factor GTK3 Scale the Images and widgets Available from GTK 3.10 and above Works with integer multiples of the scale factor Java 9 JEP 251: Multi-Resolution Images JEP 263: HiDPI Graphics on Windows and Linux These approaches are similar to the Mac OS X approach. But due to multiple representations used, the memory foot print will be difficult to manage. 9/17/2018

SWT Approach 1 Use SVG format for the images and icons Add a new API addRepresentation to the Image class Use appropriate representation during the rendering of the Image Problems SVG images result in increase of eclipse SDK download by more than 100 MB Windows code does not handle SVG Each representation is a image handle at the OS level Resulted in high memory usage 9/17/2018

SWT Approach 2 Create the images when required at the corresponding dpi level Make the graphics API dpi aware. Use pixel geometry Problems Too many hacks had to be performed to use pixel geometry The behavior will not be consistent across all platforms 9/17/2018

SWT Approach 3 Change to point geometry The display geometry has been changed from pixel geometry to point geometry (similar to Mac OS X) All the coordinates in graphics API changed to point geometry All the events, sizes and locations now use point geometry Internally, SWT still uses pixel geometry to deal with OS level calls 9/17/2018

Implementation Detect the scaling factor and use while calculating the sizes in pixels Windows Use the GetDeviceCaps native API to get the dpi Linux Ubuntu Extract scaling factor from display settings Other Linux/UNIX platforms Calculate the dpi based on monitor dimensions 9/17/2018

Implementation (contd) Image Class Now the Image constructors accept sizes in points and create Image at appropriate sizes Introduced two new interfaces to have call backs while rendering ImageDataProvider getImageData(int zoom) ImageFileNameProvider getImagePath(int zoom) Image class has two new constructors Image(device, ImageDataProvider) Image(device, ImageFileNameProvider) Use these new constructors to have appropriate call backs at the time of rendering 9/17/2018

Implementation (contd) Widgets, Layouts and Resource classes Changed all the methods related to size and location calculations to use points instead of pixels All the existing public methods have been moved to *InPixels() methods New wrapper methods have been created to handle conversion from pixels to points 9/17/2018

Implementation (contd) GC class GC.drawImage() refreshes the bitmap before rendering Uses the ImageProvider API to make a call back to the client to get the appropriate bitmap and render it If not available the existing bitmap will be scaled appropriately and rendered Other public methods including draw methods Moved to *InPixels methods Added new wrapper methods to match existing public methods These wrappers provide the necessary conversion from pixels to points or points to pixels All these changes resulted in getting eclipse to render with a bigger UI on high DPI monitors! 9/17/2018

Lets see how Eclipse looks like on Ubuntu with all these changes!! 9/17/2018

New APIs ImageProviderAPI There are two ImageProvider interfaces provided for supplying the Images at higher level scaling ImageDataProvider getImageData(int zoom) ImageFileNameProvider getImagePath(int zoom) 9/17/2018

New APIs in Image Image.getBoundsInPixels() – returns image size in pixels Can be used while creating the ImageData, when used by the ImageDataProvider Image.getImageDataAtCurrentZoom() – returns image data that is used at current zoom level Useful when used with ImageDataProvider 9/17/2018

Test build is available at Next Steps Platform UI needs to be updated to use these new SWT APIs so that we can get sharper images Find a way to identify user provided scaling factor on gnome and use it Test build is available at https://drive.google.com/file/d/0B-IHCYXe3TALenBtcDl4QXVZS2M/view?usp=sharing 9/17/2018

Questions ???

9/17/2018

Evaluate the Sessions Sign in and vote at eclipsecon.org - 1 + 1