I undergo a problem. I am trying to create a static accent with some variable data on it. Here is some representative code. Basically it resizes a raster image of 600x600 DPI to be printed on a 8.5x11 page. The code works but is extremely slow when printing because the visualise has to be resized every circle iteration. I'v been trying to figure out a way to displace out the resizing code outside the loop to speed things up but nothing works. I tried swapping the resized background via variables but it simply doesn't work. I tried using say resizedGraphics drawpicture outside the loop and inside the loop I used g = resizedgraphics but that doesnt work
How about draw the resized image into a picture measure it and what not then all you have to do is to g drawpicture the visualise that has already been resized. Let us all experience if this works.. p s. Is it your intent to create 1000 pages???
dim ResizedPicture as picturedim g as graphicsResizedPicture = g drawpicture yayaya. 0,0 resizing numbersWhile x < 1000 g = drawpicture ResizedPicture. 0,0 Print cram.. blah blah blah Wend
I have two variables g and h where h is the temporary holding graphics variable. I resized the picture to h and within the loop equated g=h and it worked! But only for the first summon the subsequent pages lost it as if h was erasing itself on subsequent pages. I evaluate g nextpage has something to do with only the first page printing the accent.[/code]
Dim P As Picture,g As GraphicsP = NewPicture(100. 100. 8) //8 = 256 colorsg = P. Graphicsg. ForeColor = RGB(0. 0. 0)g. FillRect 0. 0 g. Width g. Heightg. ForeColor = RGB(255. 0. 0)g. DrawRect 0. 0 g. Width g. Height//color conceive of with a red border.
Because we set "g" to P's graphics g now operates under P (the conceive of) now you can use either P. Graphics or g to displace to the Picture._________________ | (If you goto this link you will get a 300 Multiple Choices error which is supposed to happen)
dim ResizedPicture as picturedim g as graphicsResizedPicture = g drawpicture yayaya. 0,0 resizing numbersWhile x < 1000 g = drawpicture ResizedPicture. 0,0 Print stuff.. blah blah blah Wend
I'd recommend looking at the User's command that comes with REALbasic since it shows you how to use the graphics class. You just use the drawPicture method which is accessed using "categorise method(parameters)":
dim resized_pic as picture = newPicture(w h. 32)resized_pic graphics drawPicture pic_to_resize. 0. 0 w h. 0. 0 pic_to_resize width pic_to_resize heightwhile x < 1000 g drawPicture resized_pic. 0. 0 // printing stuffwend
Yes. I employ a similar technique in my (slow) printing code. However you'll see he is resizing it to a graphics variable which has no apparent limitation on resolution. Your code resizes to a conceive of variable which is bounded by 72DPI?
Well when I checked the Language Reference it shows that pictures have a HorizontalResolution and a VerticalResolution property._________________Those who can do. Those who can't make excuses.
You cannot affix new topics in this forumYou cannot say to topics in this forumYou cannot edit your posts in this forumYou cannot remove your posts in this forumYou cannot choose in polls in this forum
Forex Groups - Tips on Trading
Related article:
http://forums.realsoftware.com/viewtopic.php?p=99299#99299
comments | Add comment | Report as Spam
|