OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   Macros/Add-ons (http://forum.oberonplace.com/forumdisplay.php?f=41)
-   -   Create a New Object layer from Mask (http://forum.oberonplace.com/showthread.php?t=24708)

ddonnahoe 25-11-2014 10:51

Create a New Object layer from Mask
This is my first attempt at PhotoPaint macros. I write them all the time for Draw, but it's a little different in Paint. I'm using X7.

Sub ClipWhite()
    Dim doc As Document, lyr As Layer
    Set doc = ActiveDocument
    Set lyr = doc.ActiveLayer
    'create new object from selection
    'create mask from active object
    'delete original object
    If Application.Documents.Count = 0 Then
        Set doc = Nothing
    End If
End Sub

I have this code that inverts the active mask and crops the image to the mask, but now I want to edit it to create a new object from the mask after the invert, delete the original background layer.

I'm doing it this way rather than making the background layer and object, since that effectively removes the mask selection.

All times are GMT -5. The time now is 09:11.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com