You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
kriss a4d3e62796 FEATURE: Compress Data
CLEANUP: Separating out much of the concern of the large pyPenNotes.py file into SaveRestore.py and UserDrawingArea.py

patch from haakeyar Thanks a lot!

--- Full Ticket Message ---

UserDrawingArea.py is a widget that the user can draw on and you can receive tha strokes that the user has drawn.

SaveRestore contains classes for saving and loading the data. It is split into two closes. A base class takes care of things in common for all file formats, while a subclass implements the actual file format. This way, we could easily implement other file formats, for example a text format where only parts of the file are loaded, to improve loading speed, or ability to save to an sqlite file.

In the base class, I have implemented a simple compression of the notes. Points closer than QUALITY_LOSS (currently set at 5) pixels are merged. This compressed a test note file with 77% and you can barely see the difference. I have attached the original file, the compressed file and a a file with two notes file, the compressed first and the original last (open this file in the original pyPenNotes and switch between the notes to see the difference).
There are also other ways to compress the notes even more (no need for more than two points in a straight line), but I have not implemented that (yet).

Maybe it would be better to move the compression to UserDrawingArea - it would have both good and bad sides.

pyPenNotes.py still has too much responsibility in my opinion - it both displays the window and coordinates SaveRestore and UserDrawingArea, but I haven't done anything about that (yet).

If you want to discuss any of the changes, feel free to contact me on IRC or mail me at my nick at gmail dot com if you want to discuss the changes. 

git-svn-id: http://www.neo1973-germany.de/svn@73 46df4e5c-bc4e-4628-a0fc-830ba316316d
16 years ago
SMSTool Tagging the 0.3c release - Release from 06-Oct-2007 17 years ago
SettingsGUI BUGFIX: use configured command when calling hciconfig - Thanks haakeyar! 16 years ago
denis Ja es ist das Neo 1973 :) 17 years ago
images added neo1973-germany logo 17 years ago
pyFeedRead Tagging the 0.2 release - Release from 24-Sep-2007 17 years ago
pyPenNotes FEATURE: Compress Data 16 years ago
pylgrim adjusted pathes 16 years ago
pyphone added pyphone as example code 17 years ago
unitc delete unitc.png 17 years ago
zadje_klon added zadje clon with edje animations instead of evas 17 years ago