Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: Drawing off-pixel locations

Again, I'm not really sure what magic you expect SVG to do with coordinate conversions. You can maintain

your own MODEL like SVG and just scale and round when you render a given VIEW.

The only issue is that the SVG conversions may be faster or invoke other

rendering technique that do better antialiasing or something. There are a lot

of details it could take care of but you are free to maintain floats and draw as scaled

ints.

 

I guess I would look at some test cases and get some data for comparisons

but if you have your own drawing code it may be extensible but

could miss out on SVG features.

 

( now I remember the problem, this forum editor  is much slower than many other places. While waiting for cursor to return here, I went and checked some images and did other things in other browser windows .... It was awful on IE, usable on debian but still annoying although I have more memory here I have a lot of other stuff open and that hesitates sometimes too... )

Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Drawing off-pixel locations

SVG is just so I can create the PDF and be able to keep it as unmodified as possible (in terms of element positions). SVG can also be easily scaled, rotated, and manipulated for whatever purpose I might need it for. I did some tests yesterday and it seemed relatively quick considering what It was drawing.

 

I'm not ruling out converting to ints but that is very low on the list since it would reek havoc on the alignment of different elements. That is why I created this post in the first place.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: Drawing off-pixel locations

I still don't understand where the problem is here. You insist on creating a pixel array and

discarding your input data? While this sounds like something a PDF proponent would do, i can assure you that you can keep whatever data you ave to whatever prescisions and just keep regernating a new set of pixels with new scale info I don't understand what you think is magic about SVG it will have to do the same thing. For example, people render 3D models an retrain the model, allowing new views. What is the problem here that SVG will get around?

Now again you may need to adjust pixel values and do some antialiasing yourself

but you don't need to worry abour progressive loss of image quality due to repeated  scaling the

single rendered view.

 

another petit mal,

 junk left in trying to get respons, non;lj;lkj ;lkj;lkj k;lj why do I need a gig of memory just to post to a forum? '

 

 

 

 

 

 

 

Highlighted
Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Drawing off-pixel locations

I don't know where I said that I was going to create a pixel array/SVG and then discard the input. The way that library is designed the input (PDF) and output (SVG/Bitmap) are stored in the same object. Nothing is discarded unless memory gets low.

 

I keep thinking SVG because it at least lets me draw at non-pixel aligned boundaries. I did some tests and it anti-aliases the lines (which is desired) yet allows me to change the scale/location with one function call. I still need to do testing and optimizations on it so SVG isn't the holy grail/savior of it.

 

As for your forum issues, I don't know, I've ran this on everything and don't have any issues with it.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.