Monday, 1 December 2014

Markup for class diagram and other changes



Class and Interface markup


Two new tags added for creating class diagram.

1.       .class. tag to indicate a class object
2.       .inf. tag to indicate an interface

Here is an example usage:


 

Minor changed to dot and bullet markup


A sequence of dots that is not followed by text is shown as:

·         Number of consecutive dots <= 3 is shown as typed “.” , “..”, “…”
·         Number of consecutive dots > 3 is now equivalent to .div. tag

A sequence of dots followed by text is still representing as bullet like before

. bullet 1
. bullet 2
.. incline bullet
… triple incline bullet


  •   bullet1
  •  bullet 2
    • incline bullet
      • triple incline bullet

Monday, 17 November 2014

Nexus 10 and Android Lollipop (5) problem (Solved)

This is now address in version 1.6.0.  I like to give special thanks to Anton and Felix for helping me verifying and debugging this problem.

What is the problem?

There seems to be a bug with Nexus 10 and Android L opengl shader program implementation.  I have been using this shader program for all platforms and devices including IOS since now.  



precision mediump float;
            uniform vec4 vColor;
            varying vec2 vTextureCoord;
            uniform sampler2D sTexture;
            uniform lowp float textureMask;

            void main() {
                  gl_FragColor = textureMask * texture2D(sTexture, vTextureCoord)*vColor  + (1.0- textureMask)*vColor;
            }


 This shader program is simply for rendering any set of vertices with color and/or texture based on the "textureMask" variable.  I dont know exactly what happened internally with the driver but when rendering different vertices as color or texture the driver throw a glerror 1285 which stand for "out of memory".  However, I think the problem is because of the memory corruption when switching between texture and color.  

Case 1) To render object as pure color, I just need to pass in just the position vertices while disable the texture vertices.  

Case 2)  To render object with texture, I need to pass in both the position and texture vertices.

 What I think is that when switching from case 2 back to case 1.  The driver may not recognize that the texture vertices should be disable and potentially reference to incorrect memory.  This is my guess but it make the most sense.


The solution:


I have created two separate shaders for each purpose so there are no need for extra flag and optional parameter for the cases I described.  By breaking them into two simple shader programs I am able to bypass the driver glitch.

Lesson Learned:

Simple is better :)

------------------------------------------------------------------------------------------------------------------------------

Right now there seems to be problem running Drawexpress with the latest Android Lollipop on Nexus 10.  The problem is related to opengl issues.  I am not sure about the exact problem yet since I dont have the Nexus 10 device to test with yet. If you have a Nexus 10 please hold off on updating to Lollipop. 

If you have other devices and are having the problem loading Drawexpress after Lollipop update please email me at support@drawexpress.com.  I am also greatly appreciated if anyone with Nexus 10 who is willing to join my Android beta testing program.

- PD

Thursday, 23 October 2014

Color Workflow and Palette



Hello, this is Peter Duong the author of DrawExpress.  One user had reminded me that I haven’t updated this blog for a while.  At that time, I was updating features here and there.  However I felt that I wasn’t working on anything exciting to talk about.   You can follow my changes log to get an idea of what have been done since.  Anyways, the “Features and Roadmap” page is turning out to be close to the changes log.  Now, I think it is better to discuss about some of the major pain points and design decisions instead. 

So looking back at all the features added recently, I feel that some of them aren’t solved properly yet.  Although, it provides the added functionality, however it is still lacking in the user experience aspect of DrawExpress.   So I decided to take a step back to look at them and come up with better a solution before moving forward. So for the next few blogs I am opened to discussion and hopefully getting some insights from you.

Here is a list of things that I have in minds:

  • Color workflow
  • Line and curve
  • Custom Library
  •  Project and file organization
  • File sharing and synchronization

For this post I am going to discuss about the color workflow.  Right now the coloring workflow is a bit confusing between the gesture and the style menu.   For those wanting a better visual diagram this is an area that will need improvement both in the UX and the coloring options.  I am still in favor of leaving in the gesture option but it will need to support the ability to change text and stroke.  Right now you can use gestures for fill and the menu for text and stroke.   

Also, the color palette and theme is really rigid and will need to be customizable.  I do not think it is necessary to create an open ended color mixture every time you want to change the color.   However, an ability to replace some of the default colors on the bar with your own favorite would be better.  I must admit that the default colors set aren’t well thought out.

Please feel free to leave your feedback regarding to this topic here or email me at support@drawexpress.com.   I’ll be updating this blog with more implementation details later.

Regards,
PD