Jump to content

Position object by specifying coordinates of midpoint


Recommended Posts

Is there a function (or even a plugin) where one can position an object by specifying the coordinates of the midpoint of where the object should be (relative to the canvas)?

I have been doing this manually for a while, that is hovering over the midpoint and manually moving the object, and hovering over the midpoint again to see if it is in the desired position. I am wondering if there is a quicker alternative.

 

 

Edited by guocuozuoduo
clearer wording
Link to comment
Share on other sites

6 hours ago, NSD said:

I made this plugin for you. Maybe it's useful...

 

 

AlignNSD.zip 7.86 kB · 7 downloads

Hello,

Unfortunately your plugin is not what I wanted for the following reasons:

  1. Your plugin provided the range of numbers from -1 to 1, while I need the range from 0 to 1.
  2. I have a selected part with transparent background. Your plugin tried to position the entire colored (non-transparent) part relative to the selected area (and if the colored part reaches the border of the selected area then it stops moving, regardless of how far I continue to drag the slider). What I truly need is to center the midpoint of the selected area (regardless of how much of it is transparent) relative to the entire canvas.
  3. With your plugin, if the colored part reaches the border of the selected area, then regardless of the fact that I continue to drag the slider, the object stops moving. I would need my object to continue moving, even if it goes outside the canvas.

I am having trouble installing xod's Align+, as I can't find the mentioned two OptionBasedLibrary v0.7.9 files in the attachment.

Link to comment
Share on other sites

  • 7 months later...

Hi @NSD

Are you still working on this? It fails to load in 4.2.16 with this error message

 

C:\Program Files\paint.net\Effects\Align+.dll, version 0.7.0.0

Name: Align+
Type: AlignEffect.AlignEffectPlugin
Version: 0.7.0.0
Author: NSD
Copyright: Copyright © 2019
Website: https://forums.getpaint.net/
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at OptionControls.OptionContext.GetContext(String id, Assembly assembly, String dlcName)
   at OptionBased.Effects.OptionBasedEffect..ctor(Type type, Image image, EffectFlags flags)
   at AlignEffect.AlignEffectPlugin..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at PaintDotNet.Effects.EffectsCollection.TryGetEffectInfoFromType(Type effectType) in D:\src\pdn\src\PaintDotNet\Effects\EffectsCollection.cs:line 297
 

Can you let us know if you can correct it?

 

 

Issue resolved by restartng Paint

Edited by AndrewDavid
Disregard

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...