# Juce plugin interface

**URL:** <https://forum.juce.com/t/juce-plugin-interface/66961>\
**Category:** General JUCE discussion\
**Created:** [August 28, 2025, 10:44am UTC](https://forum.juce.com/t/juce-plugin-interface/66961 "2025-08-28T10:44:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jim1](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@jim1](https://forum.juce.com/u/jim1)\
**Post date:** [August 28, 2025, 10:44am UTC](https://forum.juce.com/t/juce-plugin-interface/66961/1 "2025-08-28T10:44:25Z")

</div>

I have a gain plugin with the name on the interface but when i compile it into logic pro the words move upwards here is the code, Does someone no what is wrong ? Thanks

**void** GainAudioProcessorEditor::paint (juce::Graphics& g)

{

```
// (Our component is opaque, so we must completely fill the background with a solid colour)

g.fillAll (getLookAndFeel().findColour (juce::ResizableWindow::backgroundColourId));

g.setColour (juce::Colours::white);

background = juce::ImageCache::getFromMemory(BinaryData::Both11_jpg, BinaryData::Both11_jpgSize);

g.drawImageWithin(background, 0, 0, getWidth(), getHeight(), juce::RectanglePlacement::stretchToFit);

g.setFont(juce::FontOptions("Bodoni 72 SmallCaps", 20.5f, juce::Font::plain));

g.drawFittedText("r", getX() +20, getY() -0.5, getWidth(), getHeight(), juce::Justification::topLeft,0);

g.setFont(juce::FontOptions("Rx Script", 27.5f, juce::Font::italic));

g.drawFittedText("R", getX() +10.0, getY() -30.0, getWidth(), getHeight(), juce::Justification::bottomLeft,1);

```

}

**void** GainAudioProcessorEditor::resized()

{

```
// This is generally where you'll want to lay out the positions of any

// subcomponents in your editor..

```

}

---

<div class="post-metadata">

**Author:** ![anthony-nicholls](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/anthony-nicholls/32/1246_2.png) [@anthony-nicholls](https://forum.juce.com/u/anthony-nicholls)\
**Post date:** [August 28, 2025, 11:54am UTC](https://forum.juce.com/t/juce-plugin-interface/66961/2 "2025-08-28T11:54:19Z")

</div>

You can remove the calls to `getX()` and `getY()` in your `drawFittedText` calls. The graphics context will already be relative to the location of the component being drawn.

Note, it also seems like you are trying to draw outside the bounds of the component, anything outside the component will be clipped by default.

You might find it useful to use the Rectangle class `removeFrom` functions to help you avoid this. In this case you would call `getLocalBounds()` store that in a variable and then call the `removeFrom*` functions to get the bounds for your fitted text. See this tutorial for some examples [Advanced GUI layout techniques - JUCE](https://juce.com/tutorials/tutorial_rectangle_advanced/)

---

<div class="post-metadata">

**Author:** ![jim1](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@jim1](https://forum.juce.com/u/jim1)\
**Post date:** [August 28, 2025, 12:22pm UTC](https://forum.juce.com/t/juce-plugin-interface/66961/3 "2025-08-28T12:22:28Z")

</div>

Thanks for that.
