mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
Added "Label Orientation" property to leaded components that can be used
to force labels to be rendered horizontally instead of following component placement direction
This commit is contained in:
Binary file not shown.
@@ -200,7 +200,7 @@ public class Resistor extends AbstractLeadedComponent<Resistance> {
|
||||
|
||||
@Override
|
||||
protected int getLabelOffset(int bodyWidth, int labelWidth) {
|
||||
if (value == null || getColorCode() == ResistorColorCode.NONE)
|
||||
if (value == null || getColorCode() == ResistorColorCode.NONE || getLabelOriantation() != AbstractLeadedComponent.LabelOriantation.Directional)
|
||||
return 0;
|
||||
int width = getClosestOdd(getWidth().convertToPixels());
|
||||
Color[] bands = value.getColorCode(colorCode);
|
||||
|
||||
Reference in New Issue
Block a user