It is currently Sat Jul 06, 2024 2:16 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Using a custom cursor - is it possible?
PostPosted: Thu Mar 28, 2013 6:06 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Feb 09, 2013
Posts: 31
GIMP Version: 2.8.4
Operating System: Windows
OS Version: Windows 8
GIMP Experience: Basic Level



Hello! Again!

I was just wondering if it's possible to use your own cursors - or custom ones. Now that I've spent a few weeks drawing in GIMP, the standard cross graphic for the cursor just feels unnecessarily big.

I know there are other settings, but drawing with the "brush size" one, the visual feedback is too slow, and the other alternatives are pretty nasty if you wanna see what you're doing and where you're pointing. I would really just like to have a smaller, thinner cross if I could pick.

The question is simply is it possible to replace them?


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Using a custom cursor - is it possible?
PostPosted: Thu Mar 28, 2013 9:18 pm  (#2) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
In the GIMP image window, click Edit > Preferences.

Choose Image Windows on the left and the mouse pointers are on the right. You may have to play with the settings a bit to get what you want.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Using a custom cursor - is it possible?
PostPosted: Fri Mar 29, 2013 8:56 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Feb 09, 2013
Posts: 31
Thanks for the reply! I know about the settings, but none of them can give me a plain, small, thin cross. If you remove the tool icon, you just get an even bigger cross cursor.

The brush outline cursor is mega slow and pretty much useless.

You can switch the themes out, but can you change the cursors as well? On a file level, I mean.


Top
 Post subject: Re: Using a custom cursor - is it possible?
PostPosted: Fri Mar 29, 2013 9:19 pm  (#4) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13071
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
SimonM7 wrote:
GIMP Version: 2.8.4
Operating System: Windows
OS Version: Windows 8
GIMP Experience: Basic Level



Hello! Again!

I was just wondering if it's possible to use your own cursors - or custom ones. Now that I've spent a few weeks drawing in GIMP, the standard cross graphic for the cursor just feels unnecessarily big.

I know there are other settings, but drawing with the "brush size" one, the visual feedback is too slow, and the other alternatives are pretty nasty if you wanna see what you're doing and where you're pointing. I would really just like to have a smaller, thinner cross if I could pick.

The question is simply is it possible to replace them?


@SimonM7,

You come up with some real doozies, that's a good question though. I'd like to be able to change the cursor too.
I've created some of my own cursors that if I could, I would use them with Gimp.
Don't know how to change them on a 'file level' as you described, so I'll be watching this one in hopes of an answer.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Using a custom cursor - is it possible?
PostPosted: Thu Jul 16, 2020 12:36 am  (#5) 
Offline
GimpChat Member

Joined: Jan 03, 2014
Posts: 97
For those who might be interested in this, even though it's been many years (found this question using duckduck.go), on Windows (at least it was when I used it and was programming it using Delphi Object Pascal), all cursors are stored as binary resources in either the exe file itself, or in a resource dll file (see info about the system dll's in Windows). You can change the cursors, but you need a resource editor to do it, usually comes with the programming environment you choose (Visual Studio, Delphi, etc.). You also need a cursor editor since a cursor has a "hot spot" which is the action point where the action takes place when you click on things. I recall this being quite buggy at the time (10+ years ago) so the hot spots tended to float around on their own free will, unless you typed all the numbers in exactly right. Very fiddly, as I remember.
Some basic editor is usually delivered with the system you choose (VS/Delphi/etc) but you can maybe find one on-line. For an arrow it is usually the very point of the arrow that's the hot spot. For a cross-hair it is the intersection between the "legs" of the cross. And so on.

On Linux there is a whole directory of png files in the source code tree. I have only compiled Terminal applications under Linux so I have no info on what to do with the cursors in this system during compile time. I suspect, however, that you need a way to set the "hot spot" there also. Perhaps this is done in code, as text?

Who knows? Things might be done very differently these days, I left trying to develop GUIs some ten years ago and I am only writing Python code these days, in my job as a GIS engineer, and for private use. Someone who is used to compiling GIMP might be kind enough to answer with better info, but there you have it:
Possible to alter them, but not easily.


Top
 Post subject: Re: Using a custom cursor - is it possible?
PostPosted: Thu Jul 16, 2020 1:39 am  (#6) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
Gimp cursors are created on the fly, they usually contain:

* a pointer (cross-hair)
* a tool icon
* a modifier (forbidden, addition, intersect...)

In case of left-handed mouse the cursor is flipped vertically.

In case of hi-definition screens the cursor is scaled 2x.

Once the cursor is created its hot spot is set in the code (taking in account handedness and scale).

See "app/widgets/gimpcursor.c" for the gory details.

_________________
Image


Top
 Post subject: Re: Using a custom cursor - is it possible?
PostPosted: Fri Jul 17, 2020 2:01 pm  (#7) 
Offline
GimpChat Member

Joined: Jan 03, 2014
Posts: 97
Cool! Thanks for the info. :)


Top
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Cursor Locked NOT FloatingAnchor

1

No new posts Attachment(s) S640 pen cursor offset with brush

0

No new posts Can the cursor be changed for the warp transform tool?

1

No new posts Attachment(s) CanNot Move object (Mouse Action Blocked) via mouse cursor Rotate Icon

6

No new posts Attachment(s) custom font

8



* Login  



Powered by phpBB3 © phpBB Group