To optimize drawing operations on a Canvas element, we can implement a property, which will tell the engine whether UI is in a dirty state. Conceptually, it is quite a simple problem to solve. Technically, it involves a couple of checks, which must be process in correct order, so only dirty components are redrawn. In this post, we will discuss implementation possibilities for IsDirty property.
To simplify handling of interactions between a mouse and UI component, I needed to find a well placed abstraction. Such abstraction must be pretty thin, not to overload the types which would derive from it. As initially I have only two changes to the state to handle (background and border change), I decided to introduce HoverableUIObject, which is going to be described in this post.
Working with CanvasRenderingContext2D is quite a fun, but sometimes requires diving deeper into specification to understand more advanced concepts. In this blog post (being the very first article of a series), I’m trying to present how setting a proper value for text baseline affects positioning of drawn UI components.
Just recently I started working with Azure VM Image Builder to find the optimal solution for a business case I’m working on. As always, when working with Azure, time needed to complete a task depends not on the technical complexity, but rather on how mean Azure Resource Manager will be for a particular scenario.