Tuesday, February 13, 2007

Apache Batik, VMWare Workstation

Ah ha, I figured out why I couldn't get apache batik to draw. In the java code, I was adding a child element to the wrong parent. Did discover batik doesn't support the textpath method=stretch feature and the font-face font-stretch feature. That sucks. For the most part, what I'm getting looks good, but there's either a gap or an overhang due to not being able to stretch the glyph. Let's hope at least one of those features becomes available in a future batik release.

Oh, and I discovered the batik mail archive is searchable at a different link than what's given at the batik site. Try this site or this site. What a puzzle. Thank goodness for the internet. I really hope the batik tutorial book I ordered is useful.

VMWare Workstation. One of the best tools ever. It's an application which lets you run one operating system on another. For example, I have the windows version of vmware. Inside that I can run linux, solaris, or another version of windows. I can run multiple operating systems at once too, share files between windows & linux, access the internet. It's awesome! Pretty cheap too, for what it does. There's a free VMWare Player available which gives you an idea what VMWare Workstation does. Check it out if you're interested in running linux, but also want to use windows, or vice versa. If you're a developer, it comes in really handy testing your applications on multiple platforms. One thing to note: solaris support is still limited.

Friday, February 9, 2007

Batik Tutorial, Dell Small Business 360

So I ordered the batik tutorial book from Amazon. I hope it comes soon because it's a pain in the butt trying to figure things out without a good tutorial. After wasting all day debugging, it looks like batik doesn't like my custom font-family definition. Syntax looks fine, function calls seem. Just don't know yet what's wrong.

Dell has opened a free small business advice site. Has links to dell forums, info on starting a business. Seems like it might be useful once it gets going. You can check it out here.


Thursday, February 8, 2007

Glyphs along a path, Apache Batik, SVG, Memory test

Finally got glyphs along a path working using hard coded values in an svg. Now I have to port it to batik to make things dynamic. Having problems so far. The svg has been ported over using all the hard coded values, but the applet won't init. I've got things narrowed down & it appears to have something to do with the textPath. I really wish you could search the apache batik mailing list. If anyone knows how, please let me know, maybe I'm missing something.
I did discover the syntax needed when nesting an svg within a defs statement:

defs.appendChild(internalSVGDoc.importNode(symbolDoc.getRootElement(), true));

Somebody really needs to write an in depth batik book or tutorial on how calls such as this are made. The batik javadoc is useless for beginners. Us beginners need to know how to put calls together. We need links to dom tutorials. Something good to get us started. It's tough putting pieces together.

Wow, I spoke too soon. This book at Amazon is finally available. Woohoo, guess I know what I'll be ordering next. Looks like it is going fast, only 3 left in stock.

If you are in need of more memory for your computer, check out this site. It will analyze your system & tell you how much memory you have & how much more you could add. Pretty cool. I have a gig, but could max out at 4 gig. The more memory, the better. Definitely a worthwhile investing if you're planning on keeping your machine for a while.

Tuesday, February 6, 2007

Microsoft, Zip software, Download.com

Did you know Microsoft automatically sets aside 20% of your bandwidth for things such as windows updates? I didn't either until I read it here. I did what the post said to, but I haven't really noticed any difference in my connection speed. It's worth a try though.

I've been using winzip for a long time & it's always been free. Well, no longer. The last upgrade I did now says my 45 day trial has expired & I can no longer unzip files with it. I am now in search of a free zip program. So far I have tried coffee cup. That's a pain because you have to restart the application for every new zip file you want to open. 7-Zip looked good until I needed to unzip a file in the top level Desktop/MyDocuments directory. It wasn't listed, just C:\ so I had to dig down to find the file. If anyone has any recommendations, let me know. I'll have to visit download.com and see what else they have. By the way, that is the best site for downloads. They have everything you need in terms of free software. The software is also free of viruses, spyware, etc. Great site.

Monday, February 5, 2007

Glyphs and TextPath, Open Office

Got some good tips from the batik users group mailing list on how to solve my pattern along a path problem. One tip involves using glyphs and textPaths thanks to Andreas Neumann. Here's an example. Played around a bit & have gotten the basic idea working, need to tweak it though as far as glyph spacing. The other tip involves markers. Haven't tried it yet though. SVG is very cool. There's a ton of stuff you can do with it. One bad thing is you can't link to an external svg element. Say you have a moon defined in one svg. You can't link directly to that moon element from another svg. SVG is still evolving though, so maybe in a future release that will be supported.

When I get my income tax check, I'm planning on buying myself a laptop. Not sure yet what I'm going with though. My desktop is a Dell I bought a little over a year ago. Adding Microsoft Office was an extra couple hundred dollars. I was on a budget, so I went with Microsoft Works Suite. That includes Microsoft Word. The spreadsheet program doesn't support tabbed worksheets though. For me, that's a problem. I decided to look into open office. It's free, I think open source too. That is a great product. It includes programs which are similar to word, excel, power point, access. The spreadsheet program also supports tabbed worksheets. These imitation programs seem to do pretty much what the more expensive programs do, so when I get my laptop I don't think I will even bother with Works Suite. I'm just going to download the latest free, version of open office and save myself some money. Some of the best software is free. Stay tuned for links to other useful free software.

Friday, February 2, 2007

Apache Batik

I'm currently using Apache Batik to draw an svg in the browser window. Part of what I need to do is create a pattern for an area using a third party svg. I was having problems creating the image tag in batik. Apparently for images you need to explicitly set the namespace for the attribute like this:

Element image = document.createElementNS("http://www.w3.org/2000/svg","image");
image.setAttributeNS(null,"width",imageWidth);
image.setAttributeNS(null,"height",imageWidth);
image.setAttributeNS("http://www.w3.org/1999/xlink","href","name.svg");
parentGroup.appendChild(image); //parentGroup needs to be an existing
node reference to a group where the images should be appended

Cool. Works now, just wish I could find a site with some good advanced batik tutorials. Like where do I find info that tells me images need the namespace explicitly set. The batik site has a few tutorials, but are basically getting started tutorials. BTW, the Apache Batik site has been re-designed. I definitely like it better than the old design.

Thursday, February 1, 2007

Inkscape, Sketsa 4.0

So I downloaded the latest .45 pre-release version of Inkscape, so I could check out the pattern along path option. Drop down options in dialog box are empty, do some searching & turns out you'll need to edit pathalongpath.inx in the share/extensions subdirectory of your installation directory. Change all _item values to item and restart Inkscape if running. Voila, options. Played around a bit, seems to do what I need. Looks like the source code to do it is included in the download in pathalongpath.py. It's a python script. Took a look. Hard to decode, but looks like it's doing what I thought you'd need to do. Divide the path into small pieces, rotate, translate your symbol along the path. The key part, use a group for the symbol, which is what these 3rd party svg's I have use. I think I can do it, but I need to play around a little more.

The latest version of the svg graphics editor, Sketsa 4.0 has been released. I've got the old version. It's a good tool, but you need java 1.5 in order to install it.