[Gimp-user] script-fu-round-corners

2010-06-15 Thread John Dey
Hi List,

I circulated a script yesterday for rounding corners using the above listed 
script.  I got two suggestions for changes but neither resulting in a working 
script.  Is there a list member that would be willing to send me a small 
working script using script-fu-round-corners so I can learn how to use it.  
Thank you very much.

John
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] how to create something like harvey balls

2010-06-15 Thread Bob Meetin
Hi, 

For a client I am developing a rating system and it will incorporate 
ratings in 10% increments from 0% to 100%.  Is there a smart way in GIMP 
to fairly precise images. I will probably start at about 30px square and 
downsize if necessary.  I may wish to add some additional increments 
between 0-10 and 90-100 as eye food.

To see what Harvey Balls look like visit: 
http://www.ambor.com/public/hb/harveyballs.html

I gave it a try last night using the measure tool to mark up approximate 
angles then the path tool to actually create the slices.  They look 
fair, will certainly need to be redone befor golive, but it seems like 
there should be a smarter way to do this.

My first set of images: http://www.dottedi.biz/images/ratings

Thx, Bob

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] how to create something like harvey balls

2010-06-15 Thread Chris Mohler
On Tue, Jun 15, 2010 at 12:07 PM, Bob Meetin b...@dottedi.biz wrote:
 I gave it a try last night using the measure tool to mark up approximate
 angles then the path tool to actually create the slices.  They look
 fair, will certainly need to be redone befor golive, but it seems like
 there should be a smarter way to do this.

I would use Inkscape to draw them and then export PNG files.   In
Inkscape, after drawing an ellipse look at the start and end
parameters: if you punch in 90 for the end (and leave start at 0),
you'll have the 25% ball.  See the section on ellipses:
http://www.inkscape.org/doc/shapes/tutorial-shapes.html

Another approach would be to use SVG directly on the page (either on
the fly or saved from Inkscape) - but that is likely not supported
well by older browsers.

Chris
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] how to create something like harvey balls

2010-06-15 Thread saulgoode
Quoting Bob Meetin b...@dottedi.biz:

 Hi,

 For a client I am developing a rating system and it will incorporate
 ratings in 10% increments from 0% to 100%.  Is there a smart way in GIMP
 to fairly precise images. I will probably start at about 30px square and
 downsize if necessary.  I may wish to add some additional increments
 between 0-10 and 90-100 as eye food.

Start with a white layer. Add a black line along the bottom of the  
layer. Fill the left N% of the layer with black. Perform a  
Filters-Distorts-Polar Coordinates... with default settings.


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] script-fu-round-corners

2010-06-15 Thread Rob Antonishen
 Hi List,

 I thought I might tie off this thread by indicating that I now have a working 
 script.  It appears the definition for script-fu-round-corners in script-fu 
 console is in error in that the run-mode variable indicated is not 
 reflected in the definition of the script.  I removed the RUN-NONINTERACTIVE 
 from my script and I was off and running.  Here is the final script:


I beleive Saul Goode already indicated this is not an error.  The
calls in the PDB and are correct when calling from a plugin (C or
Python).

My understanding is that scheme scripts get their functions wrapped in
a PDB wrapper when registered, and can not be called interactively
from within scheme.  This means you can't call the registered PDB
function, but instead have to call the scheme script declaration that
was registered.

If you look in the file selection-round.scm you wil see the declaration:

(define (script-fu-selection-rounded-rectangle image drawable radius concave)
...

which is what must be called to access this from within scheme.

When this is registered in the PDB with the following call:
(script-fu-register script-fu-selection-rounded-rectangle
  _Rounded R_ectangle...
  _Round the corners of the current selection
  Alan Horkan, Sven Neumann ; authors
  Sven Neumann  ; copyright
  2004/06/07
  *
  SF-IMAGE   Image  0
  SF-DRAWABLEDrawable   0
  SF-ADJUSTMENT _Radius (%) '(50 0 100 1 10 0 0)
  SF-TOGGLE _ConcaveFALSE
)


It ends up existing with the additional run-mode parameter in front.

-Rob A
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] script: round-corners

2010-06-15 Thread Sven Neumann
On Mon, 2010-06-14 at 20:04 -0400, John Dey wrote:

 Thanks for the response.  I had added the flatten command today but
 the script still has an execution error.  Here is what I have tried:
 
 (define (round-corners filein fileout)
 (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filein filein)))
(drawable (car (gimp-image-get-active-layer image
  (set! drawable (gimp-image-flatten image))
  (script-fu-round-corners RUN-NONINTERACTIVE
  image drawable 15 TRUE 8 8 15 TRUE FALSE)
  (gimp-file-save RUN-NONINTERACTIVE image drawable fileout fileout)
  (gimp-image-delete image)))

You need to flatten the image after you've run the round-corners script
of course.


Sven


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user