MCPcopy Create free account
hub / github.com/Theverat/NormalmapGenerator / normalmapSizeChanged

Method normalmapSizeChanged

src_gui/mainwindow.cpp:893–900  ·  view source on GitHub ↗

calculates the size preview text (e.g. "1024 x 1024 px")

Source from the content-addressed store, hash-verified

891
892//calculates the size preview text (e.g. "1024 x 1024 px")
893void MainWindow::normalmapSizeChanged() {
894 int sizePercent = ui->spinBox_normalmapSize->value();
895 QString text = QString::number(calcPercentage(input.width(), sizePercent));
896 text.append(" x ");
897 text.append(QString::number(calcPercentage(input.height(), sizePercent)));
898 text.append(" px");
899 ui->label_normalmapSize->setText(text);
900}
901
902// Used to scale down the input image if a value less than 100
903// is set in spinBox_normalmapSize. We have to make sure size is at least 1

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected