Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create more obscure methods #10

Closed
vanevery opened this issue Feb 8, 2011 · 3 comments
Closed

Create more obscure methods #10

vanevery opened this issue Feb 8, 2011 · 3 comments
Assignees

Comments

@vanevery
Copy link
Contributor

vanevery commented Feb 8, 2011

interface defined in src/org/witness/sscphase1/ObscureMethod.java
original implementation defined in PaintSquareObscure.java
Blur defined in BlurObscure.java (but untested and probably not functional)

@ghost ghost assigned vanevery Apr 19, 2011
@vanevery
Copy link
Contributor Author

Still need more image overlays: "bryanize", "nathanize", smily, mask, cat
See if djhalliday can create overlay images

@vanevery
Copy link
Contributor Author

vanevery commented Jun 6, 2011

Add constants in ImageRegion.java

/*
 * Add each ObscureMethod to this list and update the 
 * createObscuredBitmap method in ImageEditor
 */
public static final int BLUR = 0; // BlurObscure
public static final int ANON = 1; // AnonObscure
public static final int SOLID = 2; // PaintSquareObscure
public static final int PIXELIZE = 3; // PixelizeObscure
int obscureType = SOLID;

Add code segment in quick action area:

        anonObscureAction = new ActionItem();
        anonObscureAction.setTitle("Anonomize Obscure");
        anonObscureAction.setIcon(this.getResources().getDrawable(R.drawable.ic_context_destroy));
        anonObscureAction.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                qa.dismiss();
                whatToDo = OBSCURE;
                obscureType = ANON;
            }
        });
        qa.addActionItem(anonObscureAction);

@vanevery
Copy link
Contributor Author

vanevery commented Jun 6, 2011

Also add code segment to ImageEditor.java createObscuredBitmap

while (i.hasNext())
{
ImageRegion currentRegion = i.next();

        // Would like this to not be dependent on knowing the relationship between 
        // the classes and the constants in ImageRegion.  Would like there to be a 
        // method within ImageRegion that creates the ObscureMethod object and passes
        // it back.  Right now though, all of the ObscureMethods take in different
        // arguments which makes it painful.
        // Select the ObscureMethod as contained in the ImageRegion
        ObscureMethod om;
        switch (currentRegion.obscureType) {
            case ImageRegion.BLUR:
                Log.v(LOGTAG,"obscureType: BLUR");
                om = new BlurObscure(obscuredBmp);
            break;

            case ImageRegion.ANON:
                Log.v(LOGTAG,"obscureType: ANON");
                om = new AnonObscure(this.getApplicationContext(), obscuredBmp, obscuredPaint);
                break;

@vanevery vanevery closed this as completed Jun 9, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant