@@ -1365,28 +1365,83 @@ popupGui <- function(dev){
1365
1365
##################################################################################
1366
1366
1367
1367
1368
+ # splashScreen <- function() {
1369
+
1370
+ # library(png) # For PNG images
1371
+ # par(mar=defaultSettings$mar, cex.axis=defaultSettings$cex.axis,
1372
+ # cex.main=defaultSettings$cex.main, bg='black')
1373
+ # colMain <- '#b4d0f3'
1374
+ # colBack <- '#0065ca'
1375
+ # plot(0, 0, type='n', xlab='', ylab='', col.axis='black')
1376
+
1377
+ # # Load the image and get its dimensions
1378
+ # img_path <- system.file("extdata", "DigestRpicture.png", package = "digestR")
1379
+ # img <- readPNG(img_path)
1380
+
1381
+ # # Define plot area without axis
1382
+ # plot(0, 0, type='n', xlab='', ylab='', axes=FALSE, xlim=c(-1.5, 1.5), ylim=c(-1.5, 1.5))
1383
+
1384
+ # # Display the image
1385
+ # rasterImage(img, 3, 3, 3, 3)
1386
+
1387
+ # # Letter positions and modern color scheme for "PANDAS"
1388
+ # letters <- c('P', 'A', 'N', 'D', 'A', 'S')
1389
+ # x_positions <- c(-0.8, -0.5, -0.2, 0.1, 0.4, 0.7) # Custom X positions for each letter
1390
+ # y_positions <- c(0.62, 0.62, 0.62, 0.62, 0.62, 0.62) # Same Y position for all
1391
+ # colors <- rep('#4da6ff', 6) # Light blue for all letters
1392
+ # cex_values <- rep(5, 6) # Font size for letters
1393
+
1394
+ # # Add shadow effect to the letters for depth
1395
+ # shadow_col <- '#00000050' # Semi-transparent black shadow
1396
+ # for (i in 1:length(letters)) {
1397
+ # text(x_positions[i] + 0.02, y_positions[i] - 0.02, letters[i], col=shadow_col, cex=cex_values[i], pos=3)
1398
+ # text(x_positions[i], y_positions[i], letters[i], col=colors[i], cex=cex_values[i], pos=3)
1399
+ # }
1400
+
1401
+ # # Add black shadow for the title "Peptide Analyzer of Naturally Digested Amino acid Sequences"
1402
+ # text(0, -0.4, 'Peptide Analyzer of', col='black', cex=1.80, font=2.3) # Black shadow
1403
+ # text(0, -0.4, 'Peptide Analyzer of', col='#4da6ff', cex=1.8, font=2) # Main text
1404
+
1405
+ # # Shadow for "Naturally Digested Amino acid Sequences"
1406
+ # text(0, -0.53, 'Naturally Digested Amino acid Sequences', col='black', cex=1.80, font=2.3) # Black shadow
1407
+ # text(0, -0.53, 'Naturally Digested Amino acid Sequences', col='#4da6ff', cex=1.8, font=2) # Main text
1408
+
1409
+ # # Version and command text, shifted further downwards
1410
+ # text(0, -0.75, paste('version 1.0.0', pkgVar$version), col='#00b3b3', font=2) # Dynamic color
1411
+
1412
+ # # Clean, minimal function list with better spacing and shifted downwards
1413
+ # text(0, -0.86, 'gp() - Generate New Proteome', col='#00b3b3', cex=1.1, font = 2) # Light blue
1414
+ # text(0, -0.94, 'pm() - Process Mascot files', col='#00b3b3', cex=1.1, font = 2) # Light blue
1415
+ # text(0, -1.02, 'fo() - Open *.dcf files', col='#00b3b3', cex=1.1, font = 2) # Light blue
1416
+
1417
+ # # Force the graphics device to refresh
1418
+ # dev.flush()
1419
+ # }
1420
+
1421
+ # splashScreen()
1422
+ ##################################################################################
1423
+ library(png) # For PNG images
1368
1424
1369
1425
splashScreen <- function() {
1370
1426
1371
- library(png) # For PNG images
1372
1427
par(mar=defaultSettings$mar, cex.axis=defaultSettings$cex.axis,
1373
1428
cex.main=defaultSettings$cex.main, bg='black')
1429
+
1374
1430
colMain <- '#b4d0f3'
1375
1431
colBack <- '#0065ca'
1376
- plot(0, 0, type='n', xlab='', ylab='', col.axis='black')
1432
+
1433
+ # Define plot area without axis
1434
+ plot(0, 0, type='n', xlab='', ylab='', axes=FALSE, xlim=c(-1.5, 1.5), ylim=c(-1.5, 1.5))
1377
1435
1378
1436
# Load the image and get its dimensions
1379
1437
img_path <- system.file("extdata", "DigestRpicture.png", package = "digestR")
1380
1438
img <- readPNG(img_path)
1381
1439
1382
- # Define plot area without axis
1383
- plot(0, 0, type='n', xlab='', ylab='', axes=FALSE, xlim=c(-1.5, 1.5), ylim=c(-1.5, 1.5))
1384
-
1385
- # Display the image
1386
- rasterImage(img, 3, 3, 3, 3)
1440
+ # Display the image - fitting it in the entire splash screen area
1441
+ rasterImage(img, -1.5, -1.5, 1.5, 1.5)
1387
1442
1388
1443
# Letter positions and modern color scheme for "PANDAS"
1389
- letters <- c('P', 'A', 'N', 'D', 'A', 'S')
1444
+ letters <- c('P', 'A', 'N', 'D', 'A', 'S')
1390
1445
x_positions <- c(-0.8, -0.5, -0.2, 0.1, 0.4, 0.7) # Custom X positions for each letter
1391
1446
y_positions <- c(0.62, 0.62, 0.62, 0.62, 0.62, 0.62) # Same Y position for all
1392
1447
colors <- rep('#4da6ff', 6) # Light blue for all letters
@@ -1419,7 +1474,7 @@ splashScreen <- function() {
1419
1474
dev.flush()
1420
1475
}
1421
1476
1422
- # splashScreen()
1477
+ splashScreen()
1423
1478
1424
1479
##################################################################################
1425
1480
0 commit comments