Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Problem with offset
Re: Problem with offset [message #14766 is a reply to message #14763] Thu, 13 March 2008 18:37 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I was bored and curious, so I thought I'd have a go at doing this with just a StringBuffer (well, two actually) and XmlTags. It's not too complicated, and the results are identical to your version (I'm not sure if I fixed the offset bug correctly or not though). I've attached the results in case they are of interest.

To finish it you would need to add a stack of Rects to allow retrieval of the clipping/offset area, but I have no idea how that works so I haven't bothered Smile. Ideally you don't really want to use XmlTag either, since this forces a DeXml call on every attribute but it makes the code simpler.

If you are worried about being able to change it on the fly, couldn't you just convert the final string into an Xml tree and then modify it? There is no interface in Draw to allow modification of previous elements anyway.

EDIT: I stupidly uploaded versions of the files that didn't compile. Fixed now.
  • Attachment: SvgDraw.h
    (Size: 2.35KB, Downloaded 391 times)
  • Attachment: SvgDraw.cpp
    (Size: 7.71KB, Downloaded 669 times)

[Updated on: Thu, 13 March 2008 19:42]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Rescale and copy area of source image into an area of dest image
Next Topic: How can I use RectTracker in a rubber-band like operation?
Goto Forum:
  


Current Time: Sat May 04 17:54:33 CEST 2024

Total time taken to generate the page: 0.03005 seconds