[Gimp-developer] gimp double cursor

2010-10-28 Thread Levente Kovacs
Hi All,

// sorry if this is not the right place to ask

I'm in the process of customizing paint tools in Gimp for a specific
application (more on that later), and I've hit a wall which I can't
seem to be able to figure out. I'd appreciate any pointers. What I'd
need at some point to be able to display a second (virtual) cursor,
similar to how it is in the clone tool during the process of cloning
itself, so when I move the real cursor around and paint something, the
second virtual cursor should follow the movement of the real one with
a defined offset/distance - nothing more, just follow the movement of
the real cursor. I'd appreciate any help in what would be the proper
(if there's any) way to do this.

Thanks,
Levente.
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] gimp double cursor

2010-10-28 Thread Levente Kovacs
Alexia: thanks, but I'm over that, but I didn't get very far in e.g.
transferring clone functionalities into paintbrushtool.
Dov: thanks, I'll check into that.

On Thu, Oct 28, 2010 at 13:44, Dov Grobgeld dov.grobg...@gmail.com wrote:
 Here is another solution to the problem, which may or may not be similar to
 the method used in clone. The code certainly needs more documentation, but I
 hope you can figure out how to use it from the test-dovtk-lasso.c example.

 http://github.com/dov/dovtk-lasso

 Regards,
 Dov



 On Thu, Oct 28, 2010 at 12:28, Alexia Death alexiade...@gmail.com wrote:

 On Thu, Oct 28, 2010 at 12:56 PM, Levente Kovacs leven...@gmail.com
 wrote:
  Hi All,
 
  // sorry if this is not the right place to ask
 
  I'm in the process of customizing paint tools in Gimp for a specific
  application (more on that later), and I've hit a wall which I can't
  seem to be able to figure out. I'd appreciate any pointers. What I'd
  need at some point to be able to display a second (virtual) cursor,
  similar to how it is in the clone tool during the process of cloning
  itself,

 Here's your answer. Read the clone tool code. Specially the bits where
 draw tool is used.



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





-- 
I am putting myself to the fullest possible use, which is all I can
think that any conscious entity can ever hope to do.
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] gimp double cursor

2010-10-28 Thread Alexia Death
On Thu, Oct 28, 2010 at 2:53 PM, Levente Kovacs leven...@gmail.com wrote:
 Alexia: thanks, but I'm over that, but I didn't get very far in e.g.
 transferring clone functionalities into paintbrushtool.
 Dov: thanks, I'll check into that.

Clone tool is  a child of the paintbrush tool as far as I know. You
really shouldn't move any functionality to the paintbrush. If you want
clone like behavior make a new tool using the cone tool as template.
If you just want paintbrush tool to show a second brush outline look
at the methods that use the gimp_draw_tool.

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


Re: [Gimp-developer] gimp double cursor

2010-10-28 Thread Levente Kovacs
Thanks, I managed to make it work, by hacking the gimpbrushtool, more
precisely the gimp_brush_tool_draw(), using the
gimp_brush_tool_draw_brush() to place another brush at the correct
offset position.
Thanks,
Levente.

On Thu, Oct 28, 2010 at 14:10, Alexia Death alexiade...@gmail.com wrote:
 On Thu, Oct 28, 2010 at 2:53 PM, Levente Kovacs leven...@gmail.com wrote:
 Alexia: thanks, but I'm over that, but I didn't get very far in e.g.
 transferring clone functionalities into paintbrushtool.
 Dov: thanks, I'll check into that.

 Clone tool is  a child of the paintbrush tool as far as I know. You
 really shouldn't move any functionality to the paintbrush. If you want
 clone like behavior make a new tool using the cone tool as template.
 If you just want paintbrush tool to show a second brush outline look
 at the methods that use the gimp_draw_tool.

 --
 --Alexia




-- 
I am putting myself to the fullest possible use, which is all I can
think that any conscious entity can ever hope to do.
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer