import net.mograsim.logic.model.model.LogicModel;
import net.mograsim.logic.model.model.components.ModelComponent;
import net.mograsim.logic.model.model.wires.Pin;
import net.mograsim.logic.model.model.LogicModel;
import net.mograsim.logic.model.model.components.ModelComponent;
import net.mograsim.logic.model.model.wires.Pin;
model.getWiresByName().values().forEach(w ->
{
Rectangle bounds = w.getBounds();
double lw = gc.getLineWidth();
if (visibleRegion.intersects(bounds.x - lw, bounds.y - lw, bounds.width + lw + lw, bounds.height + lw + lw))
model.getWiresByName().values().forEach(w ->
{
Rectangle bounds = w.getBounds();
double lw = gc.getLineWidth();
if (visibleRegion.intersects(bounds.x - lw, bounds.y - lw, bounds.width + lw + lw, bounds.height + lw + lw))
- model.getComponentsByName().values().forEach(c -> renderComponent(gc, c, visibleRegion));
+ model.getComponentsByName().values().forEach(c -> renderComponent(gc, renderPrefs, c, visibleRegion));
- private static void renderComponent(GeneralGC gc, ModelComponent component, Rectangle visibleRegion)
+ private static void renderComponent(GeneralGC gc, RenderPreferences renderPrefs, ModelComponent component, Rectangle visibleRegion)
{
Rectangle bounds = component.getBounds();
double lw = gc.getLineWidth();
if (visibleRegion.intersects(bounds.x - lw, bounds.y - lw, bounds.width + lw + lw, bounds.height + lw + lw))
{
{
Rectangle bounds = component.getBounds();
double lw = gc.getLineWidth();
if (visibleRegion.intersects(bounds.x - lw, bounds.y - lw, bounds.width + lw + lw, bounds.height + lw + lw))
{