Radius X and Y box limits

Corel Paint Shop Pro

Moderator: Kathy_9

Post Reply
jimbir
Posts: 143
Joined: Mon Apr 15, 2013 1:19 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
Location: Western NY

Radius X and Y box limits

Post by jimbir »

When you draw a circle the values in the radius X and Y boxes are limited to 1000 pixels. Can anyone tell me why? Has anyone figured out a way to work around this? I'd like to be able to draw a circle with a radius of exactly 1450 pixels.
Some time back Levifiction suggested the radii could be changed using a script but, didn't explain how. I know nothing about scripts. (After 8 years with this program, I'm still learning.)
Thanks for any replies. Jim B
PSP 2018.
Epson V550 photo scanner.
Epson Stylus C88+ Ink jet printer.
Brother HL-3170CDW laser printer
Windows 10 64 bit.
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Radius X and Y box limits

Post by LeviFiction »

Fastest and easiest way is to do this.

1) Make sure the script toolbar is open View -> Toolbars -> Script

2) Create a circle.

3) Hit the Red record button on the script toolbar.

4) Using the ellipse tool edit the XRadius only. do not edit the Y radius.

5) Save the script with a name like "ResizeCircle" or something that's easy to identify.

6) Select that script in the dropdown box on the script toolbar.

7) HIt the "Edit Script" button on the script toolbar. It looks like a piece of paper with a pencil writing on it.

8) In the dialog box that pops up, click the "Text editor button"

9) NOtepad will open up with the code of the script in it. Look for the words "RadiusX" and "RadiusY" They will look something like this

Code: Select all

            'Width': None, 
            'Height': None, 
            'RadiusX': 100, 
            'RadiusY': 0, 
            'NumberOfSides': None, 
10) Change the values to the size you want for both radius values.

11) Save the script

12) Run the script

The circle should now be as big as you wanted it to be. Just manually change these values anytime you want a specific value.

There are of course different ways to go about it. But how depends on what you're looking for. If you want the script to be smarter and less cumbersome to change the values on some actual coding will be required.
https://levifiction.wordpress.com/
Jean-Luc
Advisor
Posts: 2177
Joined: Sat Oct 22, 2011 10:50 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS Computer N751J
processor: Intel i7_4710 HQ 2_50GHz
ram: 16GB
Video Card: NVIDIA GeForce GTX 850M
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2 Tb
Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
Corel programs: PSP X7, X9, 2018 to 2023
Location: Belgium (French speaking)
Contact:

Re: Radius X and Y box limits

Post by Jean-Luc »

I think it is a display bug.
I have created a circle in a 6000x6000 pixels image.
It's width is 5000 pixels but both radius Y and X show 1000 as value ...
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Radius X and Y box limits

Post by LeviFiction »

It's not really a bug at all. The UI element uses a scrolling number with slide-bar. As a result it requires a maximum size to be effective. If it was just a textbox that only accepted numbers it would be different. So they set the limit to an arbitrary 1000. And it can't go any farther. Though you can make a circle with a radius greater than that, the box cannot show a number greater than 1000. And if you try and set the value higher than 1000 the logic will trap the event and force it to end at the maximum.

So not actually a bug, just poor planning. They might consider setting the maximum to be equal to the max variable size. Though that might get a bit out of hand. Or at least making it half the size of the longest side of the current image. Guaranteeing the maximum radius creates a circle that's the same size as the image itself. But that's neither here nor there.

When Jimbir wants to set an exact value of 1450 they can't do it manually inside the number boxes. They either have to drag it out and monitor the size, or use scripts.
https://levifiction.wordpress.com/
jimbir
Posts: 143
Joined: Mon Apr 15, 2013 1:19 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
Location: Western NY

Re: Radius X and Y box limits

Post by jimbir »

LeviFiction wrote:Fastest and easiest way is to do this.

1) Make sure the script toolbar is open View -> Toolbars -> Script

2) Create a circle.

3) Hit the Red record button on the script toolbar.

4) Using the ellipse tool edit the XRadius only. do not edit the Y radius.

5) Save the script with a name like "ResizeCircle" or something that's easy to identify.

6) Select that script in the dropdown box on the script toolbar.

7) HIt the "Edit Script" button on the script toolbar. It looks like a piece of paper with a pencil writing on it.

8) In the dialog box that pops up, click the "Text editor button"

9) NOtepad will open up with the code of the script in it. Look for the words "RadiusX" and "RadiusY" They will look something like this

Code: Select all

            'Width': None, 
            'Height': None, 
            'RadiusX': 100, 
            'RadiusY': 0, 
            'NumberOfSides': None, 
10) Change the values to the size you want for both radius values.

11) Save the script

12) Run the script

The circle should now be as big as you wanted it to be. Just manually change these values anytime you want a specific value.

There are of course different ways to go about it. But how depends on what you're looking for. If you want the script to be smarter and less cumbersome to change the values on some actual coding will be required.
I hate to do this to you and if I'm out of line, tell me. I followed your instructions and, when I opened the editor, the scrip had no x or y values. I used the proceedure below, edited the script, ran it, and got the error toward the bottom of this message.

click on ellipse tool
click on draw a circle
draw a circle
click on apply
click on new elipse vector in layers palette
click on edit mode in ellipse tool bar
click on script record button
change the value in the X radius box
click on save script and enter name
click save
select script in script dropdown
click edit script
changed radius values to what i wanted (1800 pixels) in 2 places in script.

THIS IS THE SCRIPT CONTENTS:
(with the X and Y values changed to 1800 in both sets.). The orig values were X=5 and Y=none in the top set and X=500 and Y=none in the bottom set

------------------------------------------------------------------------------
from PSPApp import *

def ScriptProperties():
return {
'Author': u'',
'Copyright': u'',
'Description': u'',
'Host': u'PaintShop Pro',
'Host Version': u'18.00'
}

def Do(Environment):
# EnableOptimizedScriptUndo
App.Do( Environment, 'EnableOptimizedScriptUndo', {
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((18,0,0),1)
}
})

# Vector Properties
App.Do( Environment, 'VectorProperties', {
'Antialias': None,
'LayerVisible': None,
'Name': None,
'StrokeMaterial': None,
'FillMaterial': None,
'StrokeWidth': None,
'MiterLimit': None,
'JoinStyle': None,
'LineStyle': None,
'TransientFixupName': u'PenToolRasterFixup',
'Left': None,
'Top': None,
'CenterX': None,
'CenterY': None,
'Width': None,
'Height': None,
'RadiusX': 1800,
'RadiusY': 1800,
'NumberOfSides': None,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Silent,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((18,0,0),1)
}
})

# Vector Properties
App.Do( Environment, 'VectorProperties', {
'Antialias': None,
'LayerVisible': None,
'Name': None,
'StrokeMaterial': None,
'FillMaterial': None,
'StrokeWidth': None,
'MiterLimit': None,
'JoinStyle': None,
'LineStyle': None,
'TransientFixupName': u'PenToolRasterFixup',
'Left': None,
'Top': None,
'CenterX': None,
'CenterY': None,
'Width': None,
'Height': None,
'RadiusX': 1800,
'RadiusY': 1800,
'NumberOfSides': None,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Silent,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((18,0,0),1)
}
})
--------------------------------------------------------------------------------------


click save
click run script
See error below:

-------------------------------------------------------------------------------------

Executing RunScript
Executing EnableOptimizedScriptUndo
Executing Vector Properties
------- Command Execution Failed -----------
Command Name: Vector Properties
Error Text: The attempted operation is not valid in the current program state.
Traceback (most recent call last):
File "<string>", line 46, in Do
JascApp.InvalidProgramState: Internal program state invalid

Script 'X-Yradius' has completed with an error.

--------------------------------------------------------------------------------------
PSP 2018.
Epson V550 photo scanner.
Epson Stylus C88+ Ink jet printer.
Brother HL-3170CDW laser printer
Windows 10 64 bit.
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Radius X and Y box limits

Post by LeviFiction »

First thing is first, before you run the script make sure that the vector circle is the only thing selected in the layers palette. This won't work on the parent raster layer, it has to be the ellipse itself that it's working on. This can sometimes get muddled in PSP.
https://levifiction.wordpress.com/
forestraven
Posts: 32
Joined: Fri Aug 15, 2014 12:31 am
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit
Location: Canada

Re: Radius X and Y box limits

Post by forestraven »

Hello LeviFiction,
Just bought PSP X9 and already regretting it. Has too many problems. I've used PSP in it's various incarnations for years but I'm not sure of this one.
I followed your instructions for making a circle of specific size. And it worked a charm but now I'm stymied by something.
I have a page open at 300 dpi per inch with a 5 inch image on it that I want to superimpose the circle on. So I figure if I want a 5" circle, that should be 1500 pixels. But when I created a script for a circle that size and run it, it creates a circle that is way bigger than what I want.
I'm obviously missing something here. Could you enlighten me as to what it is.
X6, the last version I used didn't have these problems. New and improved, eh? :)
forestraven
Posts: 32
Joined: Fri Aug 15, 2014 12:31 am
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit
Location: Canada

Re: Radius X and Y box limits

Post by forestraven »

OY! I just figured out what I was doing wrong! Feeling a little foolish. Apparently don't know my radius from my diameter!
Your solution works, LeviFiction. Just wish Corel wouldn't muck around with things. If it ain't broke, don't fix!
Thanks again.
Post Reply